The schema the SQL copilot is shown, and the check its answer must pass.
Without the project's tables the model guessed every name from the English description (BOU-513). It now sees the tables and columns the migrations create, and an answer naming anything else is refused.
The schema the SQL copilot is shown, and the check its answer must pass. Without the project's tables the model guessed every name from the English description (BOU-513). It now sees the tables and columns the migrations create, and an answer naming anything else is refused.
(check-answer edn-str tables)Read the model's HoneySQL edn-str and check it against tables.
Returns {:sql str}, the query as HoneySQL renders it, or {:errors [str]}.
Read the model's HoneySQL `edn-str` and check it against `tables`.
Returns {:sql str}, the query as HoneySQL renders it, or {:errors [str]}.(incomplete cols)cols marked as possibly missing columns, as for a table a Clojure
migration may alter: its listed columns are shown, others are not refused.
`cols` marked as possibly missing columns, as for a table a Clojure migration may alter: its listed columns are shown, others are not refused.
Budget for the schema in the prompt. A large project's migrations run to hundreds of tables; the ones the description names are sent first.
Budget for the schema in the prompt. A large project's migrations run to hundreds of tables; the ones the description names are sent first.
(render-schema tables description)(render-schema tables description max-chars)tables, {table {column sql-type}}, as one line per table, those
description names first, cut off at max-chars. A table whose columns
are nil is known by name only. nil when there are none.
`tables`, {table {column sql-type}}, as one line per table, those
`description` names first, cut off at `max-chars`. A table whose columns
are nil is known by name only. nil when there are none.(unknown-identifiers sql-str tables)The tables and columns sql-str names that tables, {table {column type}},
does not have, as messages. Not checked: the columns of a CTE, of a
subquery, or of a table whose columns are nil.
The tables and columns `sql-str` names that `tables`, {table {column type}},
does not have, as messages. Not checked: the columns of a CTE, of a
subquery, or of a table whose columns are nil.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |