141 lines
2.9 KiB
YAML
141 lines
2.9 KiB
YAML
name: SqlServerConnector
|
|
class_comment: null
|
|
dependencies:
|
|
- name: Arr
|
|
type: class
|
|
source: Illuminate\Support\Arr
|
|
- name: PDO
|
|
type: class
|
|
source: PDO
|
|
properties:
|
|
- name: options
|
|
visibility: protected
|
|
comment: '# * The PDO connection options.
|
|
|
|
# *
|
|
|
|
# * @var array'
|
|
methods:
|
|
- name: connect
|
|
visibility: public
|
|
parameters:
|
|
- name: config
|
|
comment: "# * The PDO connection options.\n# *\n# * @var array\n# */\n# protected\
|
|
\ $options = [\n# PDO::ATTR_CASE => PDO::CASE_NATURAL,\n# PDO::ATTR_ERRMODE =>\
|
|
\ PDO::ERRMODE_EXCEPTION,\n# PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL,\n# PDO::ATTR_STRINGIFY_FETCHES\
|
|
\ => false,\n# ];\n# \n# /**\n# * Establish a database connection.\n# *\n# * @param\
|
|
\ array $config\n# * @return \\PDO"
|
|
- name: configureIsolationLevel
|
|
visibility: protected
|
|
parameters:
|
|
- name: connection
|
|
- name: config
|
|
comment: '# * Set the connection transaction isolation level.
|
|
|
|
# *
|
|
|
|
# * https://learn.microsoft.com/en-us/sql/t-sql/statements/set-transaction-isolation-level-transact-sql
|
|
|
|
# *
|
|
|
|
# * @param \PDO $connection
|
|
|
|
# * @param array $config
|
|
|
|
# * @return void'
|
|
- name: getDsn
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Create a DSN string from a configuration.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return string'
|
|
- name: prefersOdbc
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Determine if the database configuration prefers ODBC.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return bool'
|
|
- name: getDblibDsn
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Get the DSN string for a DbLib connection.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return string'
|
|
- name: getOdbcDsn
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Get the DSN string for an ODBC connection.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return string'
|
|
- name: getSqlSrvDsn
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
comment: '# * Get the DSN string for a SqlSrv connection.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @return string'
|
|
- name: buildConnectString
|
|
visibility: protected
|
|
parameters:
|
|
- name: driver
|
|
- name: arguments
|
|
comment: '# * Build a connection string from the given arguments.
|
|
|
|
# *
|
|
|
|
# * @param string $driver
|
|
|
|
# * @param array $arguments
|
|
|
|
# * @return string'
|
|
- name: buildHostString
|
|
visibility: protected
|
|
parameters:
|
|
- name: config
|
|
- name: separator
|
|
comment: '# * Build a host string from the given configuration.
|
|
|
|
# *
|
|
|
|
# * @param array $config
|
|
|
|
# * @param string $separator
|
|
|
|
# * @return string'
|
|
- name: getAvailableDrivers
|
|
visibility: protected
|
|
parameters: []
|
|
comment: '# * Get the available PDO drivers.
|
|
|
|
# *
|
|
|
|
# * @return array'
|
|
traits:
|
|
- Illuminate\Support\Arr
|
|
- PDO
|
|
interfaces:
|
|
- ConnectorInterface
|