SQLite Files
4 nodes
On this page 4
Query SQLite
FunctionRuns a query in SQLite's own SQL on a database file and gives back the rows it answers with as a table. The file is only read: nothing a query says changes it.
QuerySQLite(path: Text, SQL: Text) -> Table
Table QuerySQLite(string path, string sql)
Parameters
| name | type | default | description |
|---|---|---|---|
| path | Text | — | The database file. |
| SQL | Text | — | The query - a SELECT, a WITH or a PRAGMA that reports - in SQLite's SQL, naming the database's tables. |
Returns
| Table | Table |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- SQLite Files
- Package
- Data Analytics
Read SQLite
FunctionA table or view of a SQLite database, every row of it: the first one made when none is named. Each column keeps its kind - numbers as numbers, text as text, truths as truths and dates as dates.
ReadSQLite(path: Text, table: Text) -> Table
Table ReadSQLite(string path, string table = "")
Parameters
| name | type | default | description |
|---|---|---|---|
| path | Text | — | The database file. |
| table | Text | — | The table or view to read; the first when empty. |
Returns
| Table | Table |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- SQLite Files
- Package
- Data Analytics
SQLite Table Names
FunctionThe names of a SQLite database's tables and views, in the order they were made.
SQLiteTableNames(path: Text) -> Text Array
string[] SQLiteTableNames(string path)
Parameters
| name | type | default | description |
|---|---|---|---|
| path | Text | — | The database file. |
Returns
| Names | Text Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- SQLite Files
- Package
- Data Analytics
Write SQLite
FunctionWrites tables into a SQLite database file, a database table each, and gives back the file's path. The file is made if there is none, and a table of the same name already in it is replaced, unless Append says to add the rows to it; the database's other tables are left as they were. Tables are named by Table Names, else by each table's own name, else Table1, Table2 and so on. Every table goes in or none does.
WriteSQLite -> Text
tables: Table Array
path: Text
tableNames: Text Array
append: Truthstring WriteSQLite(
Table[] tables,
string path,
string[] tableNames,
bool append = false)Parameters
| name | type | default | description |
|---|---|---|---|
| tables | Table Array | — | The tables, a database table each. |
| path | Text | — | The database file; it and its folder are made if need be. |
| tableNames | Text Array | — | What to call each table in the database, in the same order; optional. |
| append | Truth | False | Add the rows to a table of the same name already in the file, rather than replacing it. |
Returns
| Path | Text |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- SQLite Files
- Package
- Data Analytics