github.com/emcfarlane/larking@v0.0.0-20220605172417-1704b45ee6c3/starlib/starlarksql/README.md (about) 1 ## open 2 3 `open(url)` opens a SQL database returning a new `db`. 4 5 | Parameter | Type | Description | 6 | --------- | ---- | ----------- | 7 | url | string | URL of SQL database. | 8 9 ### db·exec 10 11 `b.exec(query, *args)` executes a query that doesn't return rows, like INSERT or 12 UPDATE. 13 14 | Parameter | Type | Description | 15 | --------- | ---- | ----------- | 16 | query | string | SQL query. | 17 | *args | any | Query arguments. | 18 19 ### db·query 20 21 `d.query(query, *args)` executes a query that returns rows, typically a SELEECT. 22 23 | Parameter | Type | Description | 24 | --------- | ---- | ----------- | 25 | query | string | SQL query. | 26 | *args | any | Query arguments. | 27 28 ### db·query_row 29 30 `d.query_row(query, *args)` executes a query that is expected to return at most one row. 31 32 | Parameter | Type | Description | 33 | --------- | ---- | ----------- | 34 | query | string | SQL query. | 35 | *args | any | Query arguments. | 36 37 ### db·ping 38 39 `d.ping()` the database, good for checking the connection status. 40 41 ### db·close 42 43 `d.close()` closes the database connection. 44 45 ## errors 46 47 - `err_conn_done` 48 - `err_no_rows` 49 - `err_tx_done`