1.0.0 • Published 20 days ago
fastlaunch-datasources v1.0.0
About
fastlaunch-datasources
is datasources system for fastlaunch apps – to manage connections, fetch & update data in different sources.
Usage
Install via pnpm:
pnpm add fastlaunch-datasources
Use createConnector
for creating datasource connector and try to connect:
import { createConnector } from "fastlaunch-datasources";
// Correct connector will be created, based on provided config
const db = createConnector({
is: "database",
access: "write",
type: "mysql",
hostname: "127.0.0.1",
port: 3306,
username: "username",
password: "password",
database: "database",
});
console.log(await db.tryConnect()); // true
Query some data:
import { createConnector } from "fastlaunch-datasources"
const db = createConnector({
is: "database",
access: "write",
...
});
const table = await db.getTable('users');
// Get first 25 users (first page, 25 rows per page)
console.log(await table.getRows(1, 25)); // [...]
Supported connectors & sources
To connect to some source of data you should use some type of connector, list of planned connectors:
– DatabaseConnector
(MySQL/MariaDB, PostgreSQL/CockroachDB/Amazon Redshift, SQLite3, MSSQL)
– AirtableConnector
(Airtable)
– GoogleSheetsConnector
(Google Sheets)
– FileConnector
(CSV/XLSX stored in S3)
DatabaseConnector
Already implemented. Documentation will be soon.
AirtableConnector
Currently is not implemented.
GoogleSheetsConnector
Currently is not implemented.
FileConnector
Currently is not implemented.
1.0.0
20 days ago