🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@themost/sqlite

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@themost/sqlite

MOST Web Framework SQLite Adapter

2.10.0
latest
Source
npm
Version published
Weekly downloads
1.1K
121.72%
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 12 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts