SQL Server on pytds (Effect's @effect/sql-mssql; the
pyfect-dev[mssql] extra, never imported by pyfect).
pytds speaks TDS in pure Python, as tedious does in Node; each connection's
calls run on a thread of its own, so the client works under run_blocking
and run_async and no fiber blocks::
from pyfect.sql import mssql
layer = mssql.layer(
mssql.MssqlClientConfig(
server="localhost", username="sa", password=redacted.make("..."), trust_server=True
)
)client:MssqlClient(anSqlClientwith itsconfig,paramandcall),make,layer,layer_config,layer_from,make_compilerconfig:MssqlClientConfigtypes:TYPES,ParameterOptions,default_parameter_typesparameter/procedure: stored procedure callserror: error number classificationmigrator: migrations
Statements run through sp_executesql with @1, @2, ...
parameters, typed by parameter_types unless given with param.
Values are pytds's: DECIMAL reads as Decimal, DATETIME as a
naive datetime (sent as its UTC wall clock when aware),
UNIQUEIDENTIFIER as uuid.UUID, binary as bytes. A request's
rows are those of all its result sets in turn.
Re-exports#
- From
pyfect.sql.mssql.client:layer,layer_config,layer_from,make,make_compiler,MssqlClient,MssqlClientService - From
pyfect.sql.mssql.config:MssqlClientConfig - From
pyfect.sql.mssql.parameter:Parameter - From
pyfect.sql.mssql.procedure:Procedure,Result - From
pyfect.sql.mssql.types:DataType,default_parameter_types,ParameterOptions,TYPES