Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
### 1.5.34 - (unreleased)
- Offline mode (ContextSchemaPath) saves three files beside each other: schema.json for the schema, schema.descriptions.json for table and column descriptions (comments), schema.individuals.json for individuals. Builds read only the schema file; the descriptions file is read for the first tooltip and the individuals file when Individuals are first opened
- Offline tooltips show the saved table and column descriptions, instead of only "Offline mode." SaveContextSchema saves the descriptions of what you hovered over online
- A saved schema no longer carries individuals, so it stays small and loads fast. SaveContextSchema saves the individuals opened so far to the individuals file instead: a table opened again replaces its saved individuals, and the other tables in the file are kept. A schema file with individuals in it still loads them, and re-saving it moves them to the individuals file. Older versions can read the new schema files
- New design-time commands next to SaveContextSchema, online only, that read the whole database instead of what was used so far: SaveContextSchemaFull (every table, column, relationship and stored procedure, and every table and column description) and SaveContextSchemaIndividuals (individuals of every table with a single primary key)
- SaveContextSchemaFull reads the column descriptions of a table in one query instead of one per column (MS SQL Server, PostgreSQL, MySQL, Oracle, Firebird, DuckDB)
- OfflineTools.mergeCacheFiles merges descriptions and individuals files too
- Fix: after a failed SaveContextSchema, design-time commands no longer stop working until the IDE restarts
- Fix: saving individuals no longer fails on a column value such as a DateTimeOffset or an array; such values are saved as text
- Fix: offline individuals with a smallint, bigint or decimal primary key have the key in its own type, as they do online; it came back from the saved file in whatever number type fitted the value
- Fix: individuals of a table with a uuid (PostgreSQL) or uniqueidentifier (MS SQL Server) primary key can be got; getting one failed, as the key was sent as text
- Fix: MySQL, DuckDB and Firebird tables have their columns and relationships in offline mode; they had none, as these databases save the schema under other names than the offline mode looked for
- Fix: MySQL and DuckDB individuals can be got; the query quoted the table name twice, and DuckDB also never got the key
- Fix: DuckDB tables with a foreign key can be used, and have their relationships, the same way round as SQL Server and PostgreSQL have them; opening one failed with "Index was outside the bounds of the array"
- Fix: DuckDB columns of a type with a precision, such as DECIMAL(18,3), are no longer left out
- Fix: DuckDB Owner can list several schemas; no tables were found with more than one
- Fix: DuckDB DATE columns can be read on .NET 6 and later; the driver gives a DateOnly there, and reading it as the DateTime of the column failed
- Fix: DuckDB TIME columns can be read, as a TimeSpan; they were typed DateTime, and reading one always failed
- Fix: DuckDB TIMESTAMP_S, TIMESTAMP_MS, TIMESTAMP_NS and TIMETZ columns are no longer left out
- Fix: tables with a space in their name show their descriptions in tooltips (MS SQL Server, PostgreSQL, Oracle)
- Fix: PostgreSQL tables with capital letters or an apostrophe in their name show their descriptions in tooltips; reading them failed before
- Fix: MS SQL Server descriptions of a table come from its own schema; with tables of the same name in two schemas, either could show the other's
- Fix: Oracle descriptions of tables owned by another schema (Owner) are read; only the current user's tables had them before

### 1.5.33 - 19.11.2026
- Fix: a saved schema (ContextSchemaPath) loads on both .NET and .NET Framework, whichever saved it. Visual Studio, whose editor and compiler run on .NET Framework, failed on a schema saved by dotnet with "Value cannot be null. Parameter name: key"

Expand Down
42 changes: 42 additions & 0 deletions docs/content/core/parameters.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,49 @@ is saved, the outcome of the method execution is stored in memory so the file wi
In case the database schema changes and the schema file must be updated, remove the outdated file, reload
the solution and retype or uncomment a call to `SaveContextSchema` to regenerate the schema file.
The offline mode uses up to three files beside each other:
| File | Contents | Read |
|---|---|---|
| `schema.json` (`ContextSchemaPath`) | Tables, columns, relationships, stored procedures | Every build |
| `schema.descriptions.json` | Table and column descriptions (comments), shown in tooltips | For the first tooltip |
| `schema.individuals.json` | Sample rows of the [Individuals](individuals.html) feature | When `Individuals` is first opened |
Builds read only the schema file, so descriptions and individuals don't slow them down.
To save the whole database instead of the parts used so far, use these commands while online (before the schema file
exists). Each reads the whole database and may take a while on a large one:
```fsharp
// Every table, column, relationship and stored procedure, to schema.json, and every table
// and column description, to schema.descriptions.json. No rows of data.
ctx.``Design Time Commands``.SaveContextSchemaFull
// IndividualsAmount individuals of every table with a single primary key, to schema.individuals.json
ctx.``Design Time Commands``.SaveContextSchemaIndividuals
```
These two commands exist only while online. Remove the line after saving: once the schema file exists, the
solution is offline and a line that still calls one of them doesn't compile.
Individuals are rows of your data, so mind GDPR/PII before committing the individuals file to version control.
When the database schema changes, remove all three files, not only the schema file, before saving again. The
descriptions and individuals files are otherwise kept as they are, and may then describe tables and columns that
no longer exist.
`SaveContextSchema` also saves the descriptions of the tables and columns you hovered over, and keeps the descriptions
already in the descriptions file. Offline, a table or column whose description wasn't saved shows "Offline mode." in
its tooltip.
Likewise, `SaveContextSchema` saves the individuals of the tables whose `Individuals` you opened to the individuals
file. A table is in the file once: saving it again replaces its individuals, and the other tables already in the file
are kept.
Schema files saved by older versions with individuals in them still work: re-saving such a file moves its individuals
to the individuals file.
There is a tool method FSharp.Data.Sql.Common.OfflineTools.mergeCacheFiles to merge multiple files together.
It merges their descriptions and individuals files as well.
*)

Expand Down
Loading
Loading