API Docs for: 0.0.1
Show:

DB Class

Defined in: src/client-db/db.js:1
Module: client-db

Creating floating Panel-nodes which can be shown and hidden.

Copyright (c) 2014 ITSA - https://github.com/itsa New BSD License - http://choosealicense.com/licenses/bsd-3-clause/

Methods

clear

(
  • table
)
Promise

Defined in src/client-db/db.js:99

Available since 0.0.1

Empties the table.

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is undefined

contains

(
  • table
  • obj
)
Promise

Defined in src/client-db/db.js:119

Available since 0.0.1

Checks whether a table has a containes a specified record, not by reference, by by checking its property-values

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is a boolean specifying whether the table has a matched record

delete

(
  • table
  • prop
  • matches
)
Promise

Defined in src/client-db/db.js:138

Available since 0.0.1

Deletes all records of the table that have a match, defined by the matches the prop

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is an Array with all records that have been deleted

deleteDatabase

() Promise

Defined in src/client-db/db.js:149

Available since 0.0.1

Deletes a database from the client

Returns:

Promise:

Returnvalue of the fulfilled promise is undefined

each

(
  • table
  • fn
  • context
)
Promise

Defined in src/client-db/db.js:76

Available since 0.0.1

Performs a function to all the records of the table

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is undefined

has

(
  • table
  • prop
  • matches
)
Promise

Defined in src/client-db/db.js:108

Available since 0.0.1

Checks whether a table has a matched record, defined by the matches the prop

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is a boolean specifying whether the table has a matched record

read

(
  • table
  • key
  • matches
)
Promise

Defined in src/client-db/db.js:20

Available since 0.0.1

Reads one record, specified by its key.

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is an Object (record)

readAll

(
  • table
)
Promise

Defined in src/client-db/db.js:67

Available since 0.0.1

Retrieves all records of the table

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is an Array with all Objects (records) within the table

readMany

(
  • table
  • prop
  • matches
)
Promise

Defined in src/client-db/db.js:56

Available since 0.0.1

Reads multiple records, specified by matches.

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is an Array with Objects (records)

readOneByKey

(
  • table
  • key
  • matches
)
Promise

Defined in src/client-db/db.js:45

Available since 0.0.1

Reads one record, specified by its key.

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is an Object (record)

save

(
  • table
  • records
  • overwriteUnique
)
Promise

Defined in src/client-db/db.js:34

Available since 0.0.1

Saves a record. Returns an undefined promise when ready.

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is undefined

size

(
  • table
)
Promise

Defined in src/client-db/db.js:129

Available since 0.0.1

Gets the number of records in the table

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is a number

some

(
  • table
  • fn
  • context
)
Promise

Defined in src/client-db/db.js:87

Available since 0.0.1

Performs a function to some the records of the table. If the invoked function returns a trutthy value, the loop ends.

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is undefined