batchReadmethod to adapaters, handles parallel key requests on the same table.
.extend("clone")copies over one table at a time now instead of all at once.
batchReadmethod to WebSQL. Fixed bug with WebSQL string based primary keys.
.extend("clone")that lets you copy all data from the current adapter being used to another one.
groupByoption to ORM queries.
markedwas in package-lock.json, has since been removed.
.onConnected()method. You can pass a callback that will either get called right away if the database is already connected or it'll get called once the database connects.
.rawDump()method, kicks out the contents of all database tables and their rows.
.rawImport()method, lets you import table contents directly without type checking, indexing or anything else fancy.
.isConnectedproperty needed by Vue Mixin.
window["nano-sql"]is now exposed as an entry point.
BREAKING CHANGE, PLEASE READ THE MIGRATION GUIDE
.manualExec()method and query to work correctly.
getConfig()method that allows you to read the config parameters.
MANY BREAKING CHANGES, PLEASE READ THE MIGRATION GUIDE This build is intended to stabilize the library, increase performance and make it easy to extend in the future. The API for v1.X.X releases will be very stable moving forward.
nSQL("table").query("select").where(row => row.age > 20).exec()
loadCSVmethod to automate importing CSVs into the database.
updateORMquery has been removed entirely.
["column", "=", "NULL"].
.lengthqueries now work on all columns that have a valid length property, example
["meta[hairColor]", "LIKE", "blue"].
["meta[postIDs].length", ">", 2].
readCache. Lets you adjust those values for LevelDB (in MB).
manualExeca public method of
query, allowing you to pass the query object itself instead of using
*event to trigger on all database events.
describequeries have been reshaped and now also return the primary key and number of rows of the selected table.
NOT HAVEwhere condition, to find records that don't have a specific value inside an array column.
_assignmethod to check if the object is frozen before running JSON operations.
random16bitsis now public instead of private.
loadCSVto disable transactions for the import.
["orm::..."]model props should be changed to
.lengthcan now be used with array/orm columns for most queries: select:
.query("select",["arrayColumn.length AS Total"])where:
.where(["arrayColumn.length", ">", 2])groupBy:
anyas valid types.
safestrtype, identical to
stringexcept it escapes all HTML and unsafe JSON charecters.
nullvalues in string columns being type casted to
rebuildIndexes:truebefore using this version.
props: ["trie"]into the data model. The trie will always create a secondary index as well meaing
props: ["trie", "idx"]is identical to
props: ["idx"]to a data model, when a secondary index or primary key is used in a where statement the data will be retrieved much faster.
rebuildIndexes:trueconfig parameter. When passed, the lib will rebuild all secondary indexes before finishing the
connect()command. This is mainly to let folks add secondary indexes to existing data models.
.range()query modifier optimized for pagination style queries.
timeIdmstypes that generates a unique, random sortable id with 32 bits of randomness.
any. You can also typecast the array like
booland even nest the arrays like
anytype for data models, can be used with array type casting as well with
idconfig option to default storage driver.
BETWEENto be consistent regardless of data store being used.
HAVEwhere condition useful for searching arrays in the database.
LIKEbehavior where strings will be lowercased to match string values with different casing.
HAVINGaren't passed any arguments.
after_importhave now been switched to
.endTransaction()syntax. See the docs.
configparameters have been added to handle history, immutable functionionality, and persistent storage type.
flush_dbnow deletes in memory store and history as well, not just the persistent storage.
AShandling in the select queries.
First stable release, code is safe to start thinking about using in production environment.