Realtime Cloud Storage

TableSnapshot

class TableSnapshot

Class with the definition of a table snapshot.

Methods

TableRef ref()

Creates and returns the corresponding TableRef object.

Sample

// Create a storage reference
var storageRef = Realtime.Storage.create({
	applicationKey: "myApplicationKey",
	authenticationToken: "myAuthenticationToken"
});

// Retrieve the metadata (TableSnapshot) of table 'test'
storageRef.table(
	function success(tableSnapshot) {
		// Returns a reference (TableRef) of the table.
		var tableRef = data.ref();
	},
	function error(data) {
		console.error(data);
	}
);

String val()

Returns the name of the table.

Sample

// Create a storage reference
var storageRef = Realtime.Storage.create({
	applicationKey: "myApplicationKey",
	authenticationToken: "myAuthenticationToken"
});

// Retrieve the metadata (TableSnapshot) of table 'test'
storageRef.table(
	function success(tableSnapshot) {			
		// Returns the name of the table;
		var tableName = tableSnapshot.val();
	},
	function error(data) {
		console.error(data);
	}
);