@sqg/sqg 0.19.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/index.mjs +329 -36
- package/dist/sqg.mjs +336 -37
- package/dist/templates/better-sqlite3.hbs +1 -1
- package/dist/templates/java-duckdb-arrow.hbs +3 -1
- package/dist/templates/java-jdbc.hbs +9 -0
- package/dist/templates/python.hbs +15 -9
- package/dist/templates/typescript-duckdb.hbs +8 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,11 +117,15 @@ console.log(user?.name);
|
|
|
117
117
|
| Annotation | Description |
|
|
118
118
|
|------------|-------------|
|
|
119
119
|
| `-- MIGRATE name` | Schema migration (CREATE TABLE, etc.) |
|
|
120
|
+
| `-- BASELINE name` | Schema created outside SQG (ETL, sibling service). Runs before migrations for type-checking; **not** emitted in `getMigrations()` |
|
|
121
|
+
| `-- BASELINE name :source=pg` | Schema of a `type: postgres` source. Applied natively to a managed testcontainer and attached into DuckDB for introspection (DuckDB generators; needs Docker) |
|
|
120
122
|
| `-- QUERY name` | SELECT query returning rows |
|
|
121
123
|
| `-- QUERY name :one` | Query returning single row or undefined |
|
|
122
124
|
| `-- QUERY name :pluck` | Return single (first) column value |
|
|
125
|
+
| `-- QUERY name :result=Foo` | Name the row type (Java). Add it to ONE query and every same-shape query shares it. Full-table `SELECT *` reuses the `TABLE` row type without annotation. |
|
|
123
126
|
| `-- EXEC name` | INSERT/UPDATE/DELETE (no result rows) |
|
|
124
127
|
| `-- TESTDATA name` | Test data, runs after migrations |
|
|
128
|
+
| `-- TABLE name :appender` | Generate a type-safe bulk insert appender (DuckDB, PostgreSQL) |
|
|
125
129
|
| `@set var = value` | Define parameter with sample value |
|
|
126
130
|
| `${var}` | Reference parameter in query |
|
|
127
131
|
|