SSQLE
1.0
Simple SQL Editor
|
Implementation of connection to Oracle database. More...
Public Member Functions | |
void | Open () |
Opens the connection to the underlaying database. More... | |
void | Close () |
Closes the connection to the underlaying database. More... | |
QueryResult | ExecuteQuery (string query) |
Executes the query into underlaying database and retrieves the results. More... | |
void | Dispose () |
Disposes the resources not freed by GC by calling Close to underlaying database. More... | |
Static Public Member Functions | |
static OracleConnection | NewConnection (string host, string port, string sid, string user, string pass) |
Factory method for creating new instance of OracleConnection. Does not open the connection yet. Subsequent call to Open is required, before executing queries. More... | |
Private Member Functions | |
OracleConnection (string host, string port, string sid, string user, string pass) | |
Constructs new connection with given arguments. Does not open the connection yet. Subsequent call to Open is required, before executing queries. More... | |
Static Private Member Functions | |
static string | GetConnectionString (string host, string port, string sid, string user, string pass) |
Returns connection string to be used as parameter for connecting to underlaying Oracle database. More... | |
Private Attributes | |
OracleAccess.OracleConnection | connection |
Underlaying connection. More... | |
readonly string | host |
readonly string | port |
readonly string | sid |
readonly string | user |
readonly string | pass |
Implementation of connection to Oracle database.
This implementation uses native ODP.NET (Oracle Data Provider for .NET) from NuGet packages.
|
private |
Constructs new connection with given arguments. Does not open the connection yet. Subsequent call to Open is required, before executing queries.
host | Host. |
port | Port. |
sid | SID. |
user | User. |
pass | Encrypted password. See ICrypto. |
.
void SSQLE.OracleConnection.Close | ( | ) |
Closes the connection to the underlaying database.
Implements SSQLE.IConnection.
void SSQLE.OracleConnection.Dispose | ( | ) |
Disposes the resources not freed by GC by calling Close to underlaying database.
QueryResult SSQLE.OracleConnection.ExecuteQuery | ( | string | query | ) |
Executes the query into underlaying database and retrieves the results.
query | Single query to be executed by the underlaying databse. |
ODP.NET provider allows execution of only one query at any given time. That means, that ;
character is invalid in the query.
One could improve the implementation by parsing the query and looking for single command to be passed to the database by skipping comments, string literals and looking for semi colon.
Implements SSQLE.IConnection.
|
staticprivate |
Returns connection string to be used as parameter for connecting to underlaying Oracle database.
host | Host to connect to. Can be hostname, IPv4 or IPv6 address or machine name. |
port | Port to connect to. |
sid | SID to connect to. |
user | User to be authenticated as. |
pass | Encrypted password to use for authentication. See ICrypto. |
|
static |
Factory method for creating new instance of OracleConnection. Does not open the connection yet. Subsequent call to Open is required, before executing queries.
host | Host. |
port | Port. |
sid | SID. |
user | User. |
pass | Encrypted password. See ICrypto. |
void SSQLE.OracleConnection.Open | ( | ) |
Opens the connection to the underlaying database.
Implements SSQLE.IConnection.
|
private |
Underlaying connection.
|
private |
|
private |
|
private |
|
private |
|
private |