Class luasql.exasol.Environment

This class provides methods for connecting to an Exasol database and closing all connections.

Local Functions

luasql.exasol.environment.require_udf_module(modname) Load a Lua module like require() but with fallback to Exasol specific module names.
luasql.exasol.environment.encrypt_password(publicKeyModulus, publicKeyExponent, password) Encrypts a password using the given public key modulus and exponent.
luasql.exasol.environment.login(socket, username, password) Login to the database.

Methods

luasql.exasol.environment:new(args) Create a new instance of the Environment class
luasql.exasol.environment:connect(sourcename, username, password, properties) Connect to an Exasol database.
luasql.exasol.environment:close() Closes the environment and all connections created using it.


Local Functions

Methods
luasql.exasol.environment.require_udf_module(modname) line 17
Load a Lua module like require() but with fallback to Exasol specific module names.

Parameters:

  • modname string the name of the module to load

Returns:

    any the loaded module
luasql.exasol.environment.encrypt_password(publicKeyModulus, publicKeyExponent, password) line 58
Encrypts a password using the given public key modulus and exponent.

Parameters:

  • publicKeyModulus string the hex encoded modulus of the public key
  • publicKeyExponent string the hex encoded exponent of the public key
  • password string the password to encrypt

Returns:

    string the encrypted password
luasql.exasol.environment.login(socket, username, password) line 72
Login to the database.

Parameters:

Returns:

  1. table or nil connection metadata in case login was successful
  2. table or nil nil if the operation was successful, otherwise the error that occured

Methods

luasql.exasol.environment:new(args) line 45
Create a new instance of the Environment class

Parameters:

  • args optional table allows injecting a websocket module. This is only useful in unit tests and should be nil in production code.

Returns:

    luasql.exasol.Environment a new instance
luasql.exasol.environment:connect(sourcename, username, password, properties) line 90
Connect to an Exasol database.

Parameters:

  • sourcename string hostname and port of the Exasol database, separated with a colon, e.g.: exasoldb.example.com:8563. Note that the port is mandatory.
  • username string the username for logging in to the Exasol database
  • password string the password for logging in to the Exasol database
  • properties optional table optional connection properties, see luasql.exasol.ConnectionProperties:properties

Returns:

  1. luasql.exasol.Connection or nil a new Connection or nil if the connection failed
  2. table or nil nil if the operation was successful, otherwise the error that occured

See also:

luasql.exasol.environment:close() line 120
Closes the environment and all connections created using it.

Returns:

    boolean true if all connections where closed successfully
generated by LDoc 1.5.0 Last updated 2025-03-06 11:54:17