API Docs for: 0.0.1
Show:

IndexedDB Class

Module: indexeddb
Parent 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/lib/indexeddb.js:421

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/lib/indexeddb.js:464

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/lib/indexeddb.js:525

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/lib/indexeddb.js:539

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/lib/indexeddb.js:340

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

getList

(
  • db
  • table
  • cursorProp
  • prop
  • matches
  • deleteMatch
)
Promise protected

Defined in src/client-db/lib/indexeddb.js:26

Available since 0.0.1

Gets a list (Array) of records

Parameters:

Returns:

Promise:

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

getRecordByIndex

(
  • db
  • table
  • key
  • match
)
Promise protected

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

Available since 0.0.1

Gets a record

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is an Object (record)

has

(
  • table
  • prop
  • matches
)
Promise

Defined in src/client-db/lib/indexeddb.js:444

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

readAll

(
  • table
)
Promise

Defined in src/client-db/lib/indexeddb.js:328

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/lib/indexeddb.js:314

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/lib/indexeddb.js:286

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/lib/indexeddb.js:263

Available since 0.0.1

Saves a record. Returns an undefined promise when ready.

Parameters:

Returns:

Promise:

Returnvalue of the fulfilled promise is undefined

saveRecord

(
  • database
  • table
  • record
  • overwriteUnique
  • uniqueIndexes
)
Promise protected

Defined in src/client-db/lib/indexeddb.js:113

Available since 0.0.1

Saves a record. Returns an empty promise when finished.

Parameters:

Returns:

Promise:

Returnvalue is undefined

size

(
  • table
)
Promise

Defined in src/client-db/lib/indexeddb.js:480

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/lib/indexeddb.js:377

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