fastlaunch-datasources
is datasources system for fastlaunch apps – to manage connections, fetch & update data in different sources.
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)); // [...]
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)
Already implemented. Documentation will be soon.
Currently is not implemented.
Currently is not implemented.
Currently is not implemented.