SQLServer
Library of functions for accessing Microsoft SQL Server.
Functions
InferAndQuery
Performs a query in a SQLServer database with schema detection (inference).
SQLServer.InferAndQuery(database: string, query: string, host: optional string, port: optional int, username: optional string, password: optional string)
Parameters
-
database
: The name of the database to read. If the database credentials are stored in the credentials storage, then this parameter receives the name of the credential. -
query
: The query to execute in the database. -
host
: The database server hostname. Can only be used if not using registered credentials. -
port
: The database server port. Can only to be used together with 'host' argument. -
username
: The database user name. Can only to be used together with 'host' argument. -
password
: The database user password. Can only to be used together with 'host' and 'username' arguments.
Returns
collection
: A table with the data read from the SQL Server table.
SQLServer.InferAndQuery("database", "SELECT * FROM schema.table")
InferAndRead
Reads a SQLServer table with schema detection (inference).
SQLServer.InferAndRead(database: string, schema: string, table: string, host: optional string, port: optional int, username: optional string, password: optional string)
Parameters
-
database
: The name of the database to read. If the database credentials are stored in the credentials storage, then this parameter receives the name of the credential. -
schema
: The database schema name. -
table
: The name of the table. -
host
: The database server hostname. Can only be used if not using registered credentials. -
port
: The database server port. Can only to be used together with 'host' argument. -
username
: The database user name. Can only to be used together with 'host' argument. -
password
: The database user password. Can only to be used together with 'host' and 'username' arguments.
Returns
collection
: A table with the data read from the SQL Server table.
SQLServer.InferAndRead("database", "schema", "table")
Query
Performs a query in a SQLServer database.
SQLServer.Query(database: string, query: string, type: type, host: optional string, port: optional int, username: optional string, password: optional string)
Parameters
-
database
: The name of the database to read. If the database credentials are stored in the credentials storage, then this parameter receives the name of the credential. -
query
: The query to execute in the database. -
type
: The type of the query result. -
host
: The database server hostname. Can only be used if not using registered credentials. -
port
: The database server port. Can only to be used together with 'host' argument. -
username
: The database user name. Can only to be used together with 'host' argument. -
password
: The database user password. Can only to be used together with 'host' and 'username' arguments.
Returns
collection
: A table with the data read from the SQL Server table.
SQLServer.Query("database", "SELECT a, b FROM schema.table", type collection(record(a: int, b: string)))
Read
Reads a SQLServer table.
SQLServer.Read(database: string, schema: string, table: string, type: type, host: optional string, port: optional int, username: optional string, password: optional string)
Parameters
-
database
: The name of the database to read. If the database credentials are stored in the credentials storage, then this parameter receives the name of the credential. -
schema
: The database schema name. -
table
: The name of the table. -
type
: The type of the table. -
host
: The database server hostname. Can only be used if not using registered credentials. -
port
: The database server port. Can only to be used together with 'host' argument. -
username
: The database user name. Can only to be used together with 'host' argument. -
password
: The database user password. Can only to be used together with 'host' and 'username' arguments.
Returns
collection
: A table with the data read from the SQL Server table.
SQLServer.Read("database", "schema", "table", type record(id: int, name: string, salary: double))