libs/apollo.js
function(callback){

        var client = this._get_system_client();
        var keyspace_name = this._connection.keyspace,
            replication_text = '',
            options = this._options;

        replication_text = this._generate_replication_text(options.replication_strategy);

        var query = util.format(
            "CREATE KEYSPACE IF NOT EXISTS %s WITH REPLICATION = %s;",
            keyspace_name,
            replication_text
        );
        client.execute(query, function(err,result){
            client.shutdown(function(){
                callback(err,result);
            });
        });
    }
function(callback){

        var client = this._get_system_client();
        var keyspace_name = this._connection.keyspace,
            replication_text = '',
            options = this._options;

        replication_text = this._generate_replication_text(options.replication_strategy);

        var query = util.format(
            "CREATE KEYSPACE IF NOT EXISTS %s WITH REPLICATION = %s;",
            keyspace_name,
            replication_text
        );
        client.execute(query, function(err,result){
            client.shutdown(function(){
                callback(err,result);
            });
        });
    }
function ( callback ) { var client = this . _get_system_client ( ) ; var keyspace_name = this . _connection . keyspace , replication_text = '' , options = this . _options ; replication_text = this . _generate_replication_text ( options . replication_strategy ) ; var query = util . format ( "CREATE KEYSPACE IF NOT EXISTS %s WITH REPLICATION = %s;" , keyspace_name , replication_text ) ; client . execute ( query , function ( err , result ) { client . shutdown ( function ( ) { callback ( err , result ) ; } ) ; } ) ; }
Ensure specified keyspace exists, try to create it otherwise
@param  {Apollo~GenericCallback} callback Called on keyspace assertion
@private
Ensure specified keyspace exists try to create it otherwise