Skip to main content

Module sqlserver

Module sqlserver 

Source
Expand description

SQL Server introspection (via tiberius), the counterpart of the postgres module. The rows it collects are assembled into a DatabaseModel by the same code as the Postgres reader.

Every numeric catalog column is CAST to int in SQL, because tiberius does not coerce between integer widths when reading a row.

Functions§

connect
Opens a connection from an ADO-style connection string (Server=tcp:host,1433;Database=db;User Id=sa;Password=...). TLS is required unless the string says otherwise with Encrypt=.
read_sqlserver_schema
Introspects the given SQL Server schema (db_schema, e.g. "dbo") of the connected database and builds a DatabaseModel describing its tables, columns, keys, foreign keys, check constraints, views, functions, and procedures.

Type Aliases§

SqlServerClient