v0.9.9: Bug fixes and peformance improvements
SLayer 0.9.9
A small bug-fix and performance release.
Models, columns, and tables named after a SQL reserved word (order, user, group, grant, select, and friends) are now queryable. Previously the generated SQL emitted these names unquoted, so the database rejected the query. SLayer now quotes reserved-word identifiers everywhere it builds SQL - base tables, column qualifiers, join conditions, filters, and cross-model queries - across every supported dialect.
Ingesting a datasource is now noticeably faster on wide schemas. Column sample values are no longer profiled during ingest, where a full-table scan per column could dominate the run on datasources with many tables. Samples are now filled in lazily the first time you inspect a column (or explicitly via slayer search refresh-samples), so ingest stays fast and you still get sample values when you actually look at a column.
If you run the Postgres facade (slayer pg-serve), a connection can now pick up model and schema edits without reconnecting. This is opt-in: pass a catalog refresh window when starting the server, and idle connections re-check storage at most once per window, rebuilding only when something actually changed. The default behavior is unchanged - the catalog stays static for the life of the connection.
Additional technical details
Reserved-word handling has two mechanisms keyed off one curated keyword set: install_reserved_keywords() unions the set into every dialect generator so sqlglot quotes AST-built identifiers at emit time, and prequote_reserved_identifiers() token-quotes reserved words in qualifier and leaf position before SLayer-generated SQL strings are re-parsed (bare reserved words otherwise fail at parse time).
The Postgres facade refresh window is the catalog_ttl_seconds kwarg on serve(); it is throttled by a TTL and gated on the cheap graph_fingerprint staleness token, and never fires mid-transaction.