new Keyspace
Creates an instance of a keyspace
- Source:
- keyspace.js, line 17
Members
-
columnFamilies
-
A cache of column familes to help with performance
- Source:
- keyspace.js, line 37
-
connection
-
The connection object
- Source:
- keyspace.js, line 22
- See:
-
definition
-
The thrift definition of the keyspace
- Source:
- keyspace.js, line 32
-
name
-
The name of the keyspace
- Source:
- keyspace.js, line 27
-
<private, static, constant> NOOP
-
A No-Operation default for callbacks
- Source:
- keyspace.js, line 11
Methods
-
createColumnFamily
-
Creates a column family with options
Parameters:
Name Type Description name
String The name of the column family to create options
Object The options for the columns family, options are: - column_type: Can be "Standard" or "Super" Defaults to "Standard"
- comparator_type: The default comparator type
- subcomparator_type: The default subcomparator type
- comment: A comment for the cf
- read_repair_chance:
- column_metadata:
- gc_grace_seconds:
- default_validation_class:
- min_compaction_threshold:
- max_compaction_threshold:
- replicate_on_write:
- merge_shards_chance:
- key_validation_class:
- key_alias:
- compaction_strategy:
- compaction_strategy_options:
- compression_options:
- bloom_filter_fp_chance:
- columns: Columns is an array of column options each element in the array is an object with these options:
- name: *REQUIRED* The name of the column
- validation_class: *REQUIRED* The validation class. Defaults to BytesType
- index_type: The type of index
- index_name: The name of the index
- index_options: The options for the index,
callback
Function The callback to invoke once the column family has been created - Source:
- keyspace.js, line 130
-
describe
-
Loads gets all the column families and calls back with them
Parameters:
Name Type Description callback
Function The callback to invoke once the column families have been retreived - Source:
- keyspace.js, line 72
-
dropColumnFamily
-
Drops a column family
Parameters:
Name Type Description name
String The name of the column family to drop callback
Function The callback to invoke once the column family has been created - Source:
- keyspace.js, line 188
-
get
-
Gets a column family from the cache or loads it up
Parameters:
Name Type Description columnFamily
String The name of the columnFamily to get the definition for callback
Function The callback to invoke once the column family has been retreived - Source:
- keyspace.js, line 45