DbConnection

Overview

Base class for database connections.

Location


 

constructor    (declared in Object)

 

constructor

 

DbConnection()

 

init()

 

DbConnection()

 

Sub New()

BeginTransaction  virtual abstract

Start a transaction and return the transaction object.

 

method BeginTransaction(aLevel: IsolationLevel): DbTransaction

 

DbTransaction BeginTransaction(IsolationLevel aLevel)

 

func BeginTransaction(_ aLevel: IsolationLevel) -> DbTransaction

 

DbTransaction BeginTransaction(IsolationLevel aLevel)

 

Function BeginTransaction(aLevel As IsolationLevel) As DbTransaction

Parameters:

  • aLevel:

ConnectionString

Contains the connection string. Specific per database provider.

 

property ConnectionString: String read write;

 

String ConnectionString { get; set; }

 

var ConnectionString: String { get{} set{} }

 

String ConnectionString { __get; __set; }

 

Property ConnectionString() As String

CreateCommand  virtual abstract

Creates a new command object.

 

method CreateCommand: DbCommand

 

DbCommand CreateCommand()

 

func CreateCommand() -> DbCommand

 

DbCommand CreateCommand()

 

Function CreateCommand() As DbCommand

CreateCommand (DbTransaction, String, array of String, array of Object): DbCommand

Creates a new command object with the given command, transaction and parameters.

 

method CreateCommand(aTrans: DbTransaction; aCommand: String; aArgNames: array of String; aArgValues: array of Object): DbCommand

 

DbCommand CreateCommand(DbTransaction aTrans, String aCommand, String[] aArgNames, Object[] aArgValues)

 

func CreateCommand(_ aTrans: DbTransaction, _ aCommand: String, _ aArgNames: String..., _ aArgValues: Object...) -> DbCommand

 

DbCommand CreateCommand(DbTransaction aTrans, String aCommand, String[] aArgNames, Object[] aArgValues)

 

Function CreateCommand(aTrans As DbTransaction, aCommand As String, aArgNames As String(), aArgValues As Object()) As DbCommand

Parameters:

  • aTrans:
  • aCommand:
  • aArgNames:
  • aArgValues:

Dispose  virtual abstract

 

method Dispose

 

void Dispose()

 

func Dispose()

 

void Dispose()

 

Sub Dispose()

Equals  virtual    (declared in Object)

Default constructor.

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther: the reference to compare this with.

Execute

Executes a command given a query, anonymous class with the parameters, and transaction and returns the number of affected rows.

 

method Execute(aCommand: String; aArgs: Object; aTransaction: DbTransaction): Int32

 

Int32 Execute(String aCommand, Object aArgs, DbTransaction aTransaction)

 

func Execute(_ aCommand: String, _ aArgs: Object, _ aTransaction: DbTransaction) -> Int32

 

Int32 Execute(String aCommand, Object aArgs, DbTransaction aTransaction)

 

Function Execute(aCommand As String, aArgs As Object, aTransaction As DbTransaction) As Int32

Parameters:

  • aCommand:
  • aArgs:
  • aTransaction:

ExecuteAsync

Executes a command given a query, anonymous class with the parameters, and transaction and returns the number of affected rows asynchronously.

 

method ExecuteAsync(aCommand: String; aArgs: Object; aTransaction: DbTransaction): Task<Int32>

 

Task<Int32> ExecuteAsync(String aCommand, Object aArgs, DbTransaction aTransaction)

 

func ExecuteAsync(_ aCommand: String, _ aArgs: Object, _ aTransaction: DbTransaction) -> Task<Int32>

 

Task<Int32> ExecuteAsync(String aCommand, Object aArgs, DbTransaction aTransaction)

 

Function ExecuteAsync(aCommand As String, aArgs As Object, aTransaction As DbTransaction) As Task<Int32>

Parameters:

  • aCommand:
  • aArgs:
  • aTransaction:

Finalize  protected virtual    (declared in Object)

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

Open  virtual abstract

 

method Open

 

void Open()

 

func Open()

 

void Open()

 

Sub Open()

OpenIfNeeded  protected

 

method OpenIfNeeded

 

void OpenIfNeeded()

 

func OpenIfNeeded()

 

void OpenIfNeeded()

 

Sub OpenIfNeeded()

Query<T>

Executes a command given a query, anonymous class with the parameters, and transaction and binds the values to the class in T. Ignores any fields not present in the class.

 

method Query<T>(aCommand: String; aArgs: Object; aTransaction: DbTransaction): IEnumerable<T>

 

IEnumerable<T> Query<T>(String aCommand, Object aArgs, DbTransaction aTransaction)

 

func Query<T>(_ aCommand: String, _ aArgs: Object, _ aTransaction: DbTransaction) -> IEnumerable<T>

 

IEnumerable<T> Query<T>(String aCommand, Object aArgs, DbTransaction aTransaction)

 

Function Query<T>(aCommand As String, aArgs As Object, aTransaction As DbTransaction) As IEnumerable<T>

Parameters:

  • aCommand:
  • aArgs:
  • aTransaction:

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

State

Contains the current state of this database connection.

 

property State: ConnectionState read write;

 

ConnectionState State { get; set; }

 

var State: ConnectionState { get{} set{} }

 

ConnectionState State { __get; __set; }

 

Property State() As ConnectionState

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String

 

ConnectionString

Contains the connection string. Specific per database provider.

 

property ConnectionString: String read write;

 

String ConnectionString { get; set; }

 

var ConnectionString: String { get{} set{} }

 

String ConnectionString { __get; __set; }

 

Property ConnectionString() As String

State

Contains the current state of this database connection.

 

property State: ConnectionState read write;

 

ConnectionState State { get; set; }

 

var State: ConnectionState { get{} set{} }

 

ConnectionState State { __get; __set; }

 

Property State() As ConnectionState

 

ReferenceEquals    (declared in Object)

Compares two references for equivalence (even if they have an equals operator)

 

class method ReferenceEquals(a: Object; b: Object): Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

static func ReferenceEquals(_ a: Object, _ b: Object) -> Boolean

 

static Boolean ReferenceEquals(Object a, Object b)

 

Shared Function ReferenceEquals(a As Object, b As Object) As Boolean

Parameters:

  • a: left value
  • b: right value

 

constructor    (declared in Object)

 

constructor

 

DbConnection()

 

init()

 

DbConnection()

 

Sub New()

BeginTransaction  virtual abstract

Start a transaction and return the transaction object.

 

method BeginTransaction(aLevel: IsolationLevel): DbTransaction

 

DbTransaction BeginTransaction(IsolationLevel aLevel)

 

func BeginTransaction(_ aLevel: IsolationLevel) -> DbTransaction

 

DbTransaction BeginTransaction(IsolationLevel aLevel)

 

Function BeginTransaction(aLevel As IsolationLevel) As DbTransaction

Parameters:

  • aLevel:

CreateCommand  virtual abstract

Creates a new command object.

 

method CreateCommand: DbCommand

 

DbCommand CreateCommand()

 

func CreateCommand() -> DbCommand

 

DbCommand CreateCommand()

 

Function CreateCommand() As DbCommand

CreateCommand (DbTransaction, String, array of String, array of Object): DbCommand

Creates a new command object with the given command, transaction and parameters.

 

method CreateCommand(aTrans: DbTransaction; aCommand: String; aArgNames: array of String; aArgValues: array of Object): DbCommand

 

DbCommand CreateCommand(DbTransaction aTrans, String aCommand, String[] aArgNames, Object[] aArgValues)

 

func CreateCommand(_ aTrans: DbTransaction, _ aCommand: String, _ aArgNames: String..., _ aArgValues: Object...) -> DbCommand

 

DbCommand CreateCommand(DbTransaction aTrans, String aCommand, String[] aArgNames, Object[] aArgValues)

 

Function CreateCommand(aTrans As DbTransaction, aCommand As String, aArgNames As String(), aArgValues As Object()) As DbCommand

Parameters:

  • aTrans:
  • aCommand:
  • aArgNames:
  • aArgValues:

Dispose  virtual abstract

 

method Dispose

 

void Dispose()

 

func Dispose()

 

void Dispose()

 

Sub Dispose()

Equals  virtual    (declared in Object)

Default constructor.

 

method Equals(aOther: Object): Boolean

 

Boolean Equals(Object aOther)

 

func Equals(_ aOther: Object) -> Boolean

 

Boolean Equals(Object aOther)

 

Function Equals(aOther As Object) As Boolean

Parameters:

  • aOther: the reference to compare this with.

Execute

Executes a command given a query, anonymous class with the parameters, and transaction and returns the number of affected rows.

 

method Execute(aCommand: String; aArgs: Object; aTransaction: DbTransaction): Int32

 

Int32 Execute(String aCommand, Object aArgs, DbTransaction aTransaction)

 

func Execute(_ aCommand: String, _ aArgs: Object, _ aTransaction: DbTransaction) -> Int32

 

Int32 Execute(String aCommand, Object aArgs, DbTransaction aTransaction)

 

Function Execute(aCommand As String, aArgs As Object, aTransaction As DbTransaction) As Int32

Parameters:

  • aCommand:
  • aArgs:
  • aTransaction:

ExecuteAsync

Executes a command given a query, anonymous class with the parameters, and transaction and returns the number of affected rows asynchronously.

 

method ExecuteAsync(aCommand: String; aArgs: Object; aTransaction: DbTransaction): Task<Int32>

 

Task<Int32> ExecuteAsync(String aCommand, Object aArgs, DbTransaction aTransaction)

 

func ExecuteAsync(_ aCommand: String, _ aArgs: Object, _ aTransaction: DbTransaction) -> Task<Int32>

 

Task<Int32> ExecuteAsync(String aCommand, Object aArgs, DbTransaction aTransaction)

 

Function ExecuteAsync(aCommand As String, aArgs As Object, aTransaction As DbTransaction) As Task<Int32>

Parameters:

  • aCommand:
  • aArgs:
  • aTransaction:

Finalize  protected virtual    (declared in Object)

 

method Finalize

 

void Finalize()

 

func Finalize()

 

void Finalize()

 

Sub Finalize()

GetHashCode  virtual    (declared in Object)

Returns a hashcode for this object. Overriden implementations should make sure that the number returned here is constant given the same object.

 

method GetHashCode: Int32

 

Int32 GetHashCode()

 

func GetHashCode() -> Int32

 

Int32 GetHashCode()

 

Function GetHashCode() As Int32

GetType    (declared in Object)

Returns the actual type of this class

 

method GetType: Type

 

Type GetType()

 

func GetType() -> Type

 

Type GetType()

 

Function GetType() As Type

Open  virtual abstract

 

method Open

 

void Open()

 

func Open()

 

void Open()

 

Sub Open()

OpenIfNeeded  protected

 

method OpenIfNeeded

 

void OpenIfNeeded()

 

func OpenIfNeeded()

 

void OpenIfNeeded()

 

Sub OpenIfNeeded()

Query<T>

Executes a command given a query, anonymous class with the parameters, and transaction and binds the values to the class in T. Ignores any fields not present in the class.

 

method Query<T>(aCommand: String; aArgs: Object; aTransaction: DbTransaction): IEnumerable<T>

 

IEnumerable<T> Query<T>(String aCommand, Object aArgs, DbTransaction aTransaction)

 

func Query<T>(_ aCommand: String, _ aArgs: Object, _ aTransaction: DbTransaction) -> IEnumerable<T>

 

IEnumerable<T> Query<T>(String aCommand, Object aArgs, DbTransaction aTransaction)

 

Function Query<T>(aCommand As String, aArgs As Object, aTransaction As DbTransaction) As IEnumerable<T>

Parameters:

  • aCommand:
  • aArgs:
  • aTransaction:

ToString  virtual    (declared in Object)

Gets the string representation of this method.

 

method ToString: String

 

String ToString()

 

func ToString() -> String

 

String ToString()

 

Function ToString() As String