2.9.3 • Published 4 months ago

@themost/sqlite v2.9.3

Weekly downloads
67
License
BSD-3-Clause
Repository
github
Last release
4 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

4 months ago

2.9.0

5 months ago

2.9.2

5 months ago

2.9.1

5 months ago

2.8.4

6 months ago

2.8.3

8 months ago

2.8.1

9 months ago

2.8.0

9 months ago

2.8.2

9 months ago

2.7.2

1 year ago

2.7.3

11 months ago

2.7.1

1 year ago

2.7.0

1 year ago

2.6.17

1 year ago

2.6.15

2 years ago

2.6.16

2 years ago

2.6.14

2 years ago

2.6.13

2 years ago

2.6.11

3 years ago

2.6.12

2 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

3 years ago

2.6.4

3 years ago

2.6.3

3 years ago

2.6.2

3 years ago

2.6.1

4 years ago

2.6.0

4 years ago

2.5.3

5 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.2.4

5 years ago

2.2.4-dev.1

5 years ago

2.2.3

5 years ago

2.2.2

5 years ago

2.2.1

6 years ago

2.1.5

7 years ago

2.1.2

7 years ago

2.1.1

7 years ago

2.0.6

7 years ago

2.0.5

7 years ago

2.0.4

7 years ago

2.0.0-alpha.1

8 years ago

2.0.0-alpha

8 years ago