Show / Hide Table of Contents

Class OracleDatabase

Class to represent an Oracle database.

Inheritance
System.Object
DatabaseObject
OracleDatabase
Inherited Members
DatabaseObject.Connected
DatabaseObject.ConnectionString
DatabaseObject.Logger
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: DatabaseConnector
Assembly: DatabaseConnector.dll
Syntax
public class OracleDatabase : DatabaseObject

Constructors

| Improve this Doc View Source

OracleDatabase()

Initializes a new instance of the OracleDatabase class.

Declaration
public OracleDatabase()
| Improve this Doc View Source

OracleDatabase(ILogger)

Initializes a new instance of the OracleDatabase class.

Declaration
public OracleDatabase(ILogger logger)
Parameters
Type Name Description
Microsoft.Extensions.Logging.ILogger logger

The logger to be used in this library.

| Improve this Doc View Source

OracleDatabase(String)

Initializes a new instance of the OracleDatabase class.

Declaration
public OracleDatabase(string connectionString)
Parameters
Type Name Description
System.String connectionString

The connection string used to connnect to database.

| Improve this Doc View Source

OracleDatabase(String, ILogger)

Initializes a new instance of the OracleDatabase class.

Declaration
public OracleDatabase(string connectionString, ILogger logger)
Parameters
Type Name Description
System.String connectionString

The connection string used to connnect to database.

Microsoft.Extensions.Logging.ILogger logger

The logger to be used in this library.

| Improve this Doc View Source

OracleDatabase(String, String, String, String, String)

Initializes a new instance of the OracleDatabase class.

Declaration
public OracleDatabase(string host, string port, string serviceName, string userID, string password)
Parameters
Type Name Description
System.String host

Host name.

System.String port

Port number.

System.String serviceName

Service name.

System.String userID

Username for login.

System.String password

Password for login.

Methods

| Improve this Doc View Source

Connect()

Connects to the database.

Declaration
public override bool Connect()
Returns
Type Description
System.Boolean
true
if the database has been successfully connected to.
Overrides
DatabaseObject.Connect()
| Improve this Doc View Source

CreateCommandHelper(String, String, String, String, String, String)

Creates and returns the command line for executing SQL scripts.

Declaration
public static string CreateCommandHelper(string host, string port, string serviceName, string userID, string password, string filePath)
Parameters
Type Name Description
System.String host

Host name.

System.String port

Port number.

System.String serviceName

Service name.

System.String userID

Username for login.

System.String password

Password for login.

System.String filePath

File path of SQL script.

Returns
Type Description
System.String

The command line for executing SQL scripts.

| Improve this Doc View Source

CreateConnectionString(String, String, String, String, String)

Creates and returns the connection string.

Declaration
public static string CreateConnectionString(string host, string port, string serviceName, string userID, string password)
Parameters
Type Name Description
System.String host

Host name.

System.String port

Port number.

System.String serviceName

Service name.

System.String userID

Username for login.

System.String password

Password for login.

Returns
Type Description
System.String

The connection string.

| Improve this Doc View Source

Disconnect()

Disconnects from the database.

Declaration
public override bool Disconnect()
Returns
Type Description
System.Boolean
true
if the database has been successfully disconnected from.
Overrides
DatabaseObject.Disconnect()
| Improve this Doc View Source

ExecuteNonQuery(String)

Executes the given query that does not return any data (e.g. update, insert, delete).

Declaration
public override bool ExecuteNonQuery(string nonQuery)
Parameters
Type Name Description
System.String nonQuery

Query to execute.

Returns
Type Description
System.Boolean
true
if query was successfully executed.
Overrides
DatabaseObject.ExecuteNonQuery(String)
| Improve this Doc View Source

ExecuteQuery(String)

Executes the given query that retrieves data from the database.

Declaration
public override List<List<object>> ExecuteQuery(string query)
Parameters
Type Name Description
System.String query

Query to execute.

Returns
Type Description
System.Collections.Generic.List<System.Collections.Generic.List<System.Object>>

Data queried from the database.

Overrides
DatabaseObject.ExecuteQuery(String)
| Improve this Doc View Source

IsConnected()

Returns whether or not a connection has been established to the database.

true
if the database has been connected to

Declaration
public override bool IsConnected()
Returns
Type Description
System.Boolean
true
if the database has been connected to.
Overrides
DatabaseObject.IsConnected()
  • Improve this Doc
  • View Source
Back to top Generated by DocFX