Skip to content

Commit fd9212f

Browse files
Scott LottScott Lott
authored andcommitted
1.0 release 6
1 parent 39c900b commit fd9212f

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ The most powerful little database.
66
[![npm](https://img.shields.io/npm/l/express.svg?style=flat-square)](https://github.com/ClickSimply/nano-sql/blob/master/LICENSE)
77
![TSlint](https://img.shields.io/badge/tslint-passing-green.svg?style=flat-square)
88
[![npm downloads](https://img.shields.io/npm/dm/nano-sql.svg?style=flat-square)](https://www.npmjs.com/package/nano-sql)
9-
![gzip size](http://img.badgesize.io/https://unpkg.com/nano-sql@0.9.1/dist/nano-sql.min.js?compression=gzip)
109

1110
[![NPM](https://nodei.co/npm/nano-sql.png?downloads=true&stars=true)](https://nodei.co/npm/nano-sql/)
1211

@@ -21,7 +20,7 @@ Persistence supports `Local Storage`, `Indexed DB`, `Indexed DB in a Web Worker`
2120
* [Todo Example](https://some-sql.com/react-todo/)
2221
* [Draw Example](https://some-sql.com/react-draw/)
2322

24-
[Documentation](https://github.com/ClickSimply/Nano-SQL/wiki)
23+
[Documentation](https://docs.nanosql.io/)
2524

2625
## Highlighted Features
2726

@@ -66,7 +65,9 @@ I needed something small, efficient, strongly typed at runtime, optionally persi
6665

6766
## Installation
6867

69-
`npm i nano-sql --save`
68+
```sh
69+
npm i nano-sql --save
70+
```
7071

7172
Using in typescript project:
7273

@@ -121,7 +122,7 @@ nSQL('users') // "users" is our table name.
121122

122123
```
123124

124-
[Documentation](https://github.com/ClickSimply/Nano-SQL/wiki)
125+
[Documentation](https://docs.nanosql.io/)
125126

126127
## Detailed Usage
127128
First you declare your models, connect the db, then you execute queries.
@@ -196,7 +197,7 @@ nSQL().connect().then(function(result, db) {
196197

197198
```
198199

199-
[Documentation](https://github.com/ClickSimply/Nano-SQL/wiki)
200+
[Documentation](https://docs.nanosql.io/)
200201

201202
Some examples of queries you can do.
202203

@@ -290,9 +291,9 @@ nSQL("users")
290291

291292
nanoSQL is built on top of NoSQL systems so there are several performance optimizations you can take advantage of for super fast queries.
292293

293-
[Performance Docs](https://github.com/ClickSimply/Nano-SQL/wiki/4.-Default-Store#performance-considerations)
294+
[Performance Docs](https://docs.nanosql.io//4.-Default-Store#performance-considerations)
294295

295-
[Documentation](https://github.com/ClickSimply/Nano-SQL/wiki)
296+
[Documentation](https://docs.nanosql.io/)
296297

297298
## History
298299

@@ -321,7 +322,7 @@ nSQL().extend("hist", "?").then(function(status) {
321322

322323
Writes are quite a bit slower when the history system is used, and your database takes up more space. You can disable the history system from being activated by adjusting the config object before calling `connect()`.
323324

324-
[Documentation](https://github.com/ClickSimply/Nano-SQL/wiki)
325+
[Documentation](https://docs.nanosql.io/)
325326

326327
# Contributing
327328

dist/nano-sql.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/nano-sql.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/database/query.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var _NanoSQLStorageQuery = (function () {
5656
_NanoSQLStorageQuery.prototype._select = function (next) {
5757
var _this = this;
5858
var queryHash = utilities_1.hash(JSON.stringify(__assign({}, this._query, { queryID: null })));
59-
if (!this._isInstanceTable && this._store._doCache && this._store._cache[this._query.table][queryHash]) {
59+
if (!this._isInstanceTable && this._store._doCache && this._store._cache[this._query.table] && this._store._cache[this._query.table][queryHash]) {
6060
this._query.result = this._store._cache[this._query.table][queryHash];
6161
next(this._query);
6262
return;

src/database/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export class _NanoSQLStorageQuery {
112112
}));
113113

114114
// Query cache for the win!
115-
if (!this._isInstanceTable && this._store._doCache && this._store._cache[this._query.table as any][queryHash]) {
115+
if (!this._isInstanceTable && this._store._doCache && this._store._cache[this._query.table as any] && this._store._cache[this._query.table as any][queryHash]) {
116116
this._query.result = this._store._cache[this._query.table as any][queryHash];
117117
next(this._query);
118118
return;

0 commit comments

Comments
 (0)