-
Notifications
You must be signed in to change notification settings - Fork 4
Table Storage
require('bluesky').storage(options);
Returns a reference to 'storage' with the supplied options. Available options include:
- account (required)
- key (required)
Creates a new table with the supplied tableName
on this storage account. callback
is passed a reference to the newly created table.
Lists all tables in this storage account. Invokes callback
with an array of table names.
Removes the table specified by tableName
.
Returns a reference to a table (the same as returned by storage.createTable
).
Inserts the key/value pairs specified in data
into the table using the supplied partition
and row
keys. Boolean, Number, String and DateTime datatypes supported -- Number currently defaults to Edm.Double
.
Replaces any existing data at the supplied partition
and row
keys with the values provided in data
. Available options include:
- upsert - When
true
, and no row currently exists atpartition
androw
, the data will be inserted. Defaults tofalse
.
Removes the table data at the supplied partition
and row
keys.
Defines a subset of fields to be returned from a query, specified in fieldArray. Can be useful for performance and bandwidth purposes.
Applies a filter to the rows that will be returned from a query.
Applies any fields
or filters
and invokes callback
with an array of the results.
Applies any fields
or filters
and invokes callback
for each row in the results and (optionally) doneCallback
with the count of rows when done. (Errors are sent to callback
, or doneCallback
if provided. Both callback and doneCallback expect 'err' as their first parameter.)
filter
and field
are meant to be chained with all
or forEach
in a fluent API style, for example:
table.fields(['firstName','lastName']).filter({'state':'CA'}).forEach(callback, doneCallback);