2.9.3 • Published 10 months ago

@themost/sqlite v2.9.3

Weekly downloads
67
License
BSD-3-Clause
Repository
github
Last release
10 months ago

test npm Libraries.io dependency status for latest release, scoped npm package GitHub top language License GitHub last commit GitHub Release Date npm

MOST Web Framework Logo

@themost/sqlite

MOST Web Framework SQLite Data Adapter

License: BSD-3-Clause

Install

npm install @themost/sqlite

Usage

Register SQLite adapter on app.json as follows:

"adapterTypes": [
    ...
      { "name":"SQLite Data Adapter", "invariantName": "sqlite", "type":"@themost/sqlite" }
    ...
    ],
adapters: [
    ...
    { 
        "name":"local-db", "invariantName":"sqlite", "default":true,
        "options": {
            database:"db/local.db"
        }
    }
    ...
]

}

or create a new instance of SqliteAdapter class for connecting to SQLite database.

const { SqliteAdapter } = require('@themost/sqlite');
const { QueryExpression } = require('@themost/query');
const db = new SqliteAdapter({
    database: 'db/local.db'
});
const query = new QueryExpression()
    .select(({ id, name, category, model, price }) => ({
        id,
        name,
        category,
        model,
        price,
    })).from('ProductData')
    .where((x) => {
        return x.price > 500 && x.category === "Laptops";
    })
    .orderByDescending((x) => x.price)
    .take(10);
const items = await db.executeAsync(query);

Read more about MOST Web Framework query language provided by @themost/query

Use query playground project at codesanbox.io to learn more about the query language specification of @themost-framework

codesandbox.io_query-playground-1.png

2.9.3

10 months ago

2.9.0

11 months ago

2.9.2

11 months ago

2.9.1

11 months ago

2.8.4

1 year ago

2.8.3

1 year ago

2.8.1

1 year ago

2.8.0

1 year ago

2.8.2

1 year ago

2.7.2

2 years ago

2.7.3

1 year ago

2.7.1

2 years ago

2.7.0

2 years ago

2.6.17

2 years ago

2.6.15

2 years ago

2.6.16

2 years ago

2.6.14

3 years ago

2.6.13

3 years ago

2.6.11

3 years ago

2.6.12

3 years ago

2.6.10

3 years ago

2.6.9

3 years ago

2.6.7

3 years ago

2.6.8

3 years ago

2.6.5

4 years ago

2.6.4

4 years ago

2.6.3

4 years ago

2.6.2

4 years ago

2.6.1

4 years ago

2.6.0

5 years ago

2.5.3

5 years ago

2.5.1

5 years ago

2.5.0

6 years ago

2.2.4

6 years ago

2.2.4-dev.1

6 years ago

2.2.3

6 years ago

2.2.2

6 years ago

2.2.1

7 years ago

2.1.5

7 years ago

2.1.2

7 years ago

2.1.1

8 years ago

2.0.6

8 years ago

2.0.5

8 years ago

2.0.4

8 years ago

2.0.0-alpha.1

8 years ago

2.0.0-alpha

9 years ago