Class OracleDataStore
Implements Oracle general data store that auto-generates SQLs for record models and supports CRUD operations.
This class IS thread-safe load/save/delete operations
Inheritance
System.Object
OracleDataStore
Implements
System.IDisposable
Inherited Members
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)
Assembly: Azos.Oracle.dll
Syntax
public class OracleDataStore : OracleDataStoreBase, ICRUDDataStoreImplementation, ICRUDDataStore, ICRUDOperations, ICRUDTransactionOperations, IDataStoreImplementation, IDataStore, IApplicationComponent, IDisposable, IConfigurable, IInstrumentable, IExternallyParameterized
Constructors
OracleDataStore(IApplicationComponent)
Declaration
public OracleDataStore(IApplicationComponent director)
Parameters
OracleDataStore(IApplicationComponent, String)
Declaration
public OracleDataStore(IApplicationComponent director, string cs)
Parameters
OracleDataStore(IApplication)
Declaration
public OracleDataStore(IApplication app)
Parameters
OracleDataStore(IApplication, String)
Declaration
public OracleDataStore(IApplication app, string cs)
Parameters
Fields
SCRIPT_FILE_SUFFIX
Declaration
public const string SCRIPT_FILE_SUFFIX = ".mys.sql"
Field Value
Type |
Description |
System.String |
|
Properties
QueryResolver
Declaration
public ICRUDQueryResolver QueryResolver { get; }
Property Value
ScriptFileSuffix
Declaration
public string ScriptFileSuffix { get; }
Property Value
Type |
Description |
System.String |
|
StoreType
Declaration
public CRUDDataStoreType StoreType { get; }
Property Value
SupportsTransactions
Declaration
public bool SupportsTransactions { get; }
Property Value
Type |
Description |
System.Boolean |
|
SupportsTrueAsynchrony
Declaration
public bool SupportsTrueAsynchrony { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
BeginTransaction(IsolationLevel, TransactionDisposeBehavior)
Declaration
public CRUDTransaction BeginTransaction(IsolationLevel iso = IsolationLevel.ReadCommitted, TransactionDisposeBehavior behavior = TransactionDisposeBehavior.CommitOnDispose)
Parameters
Returns
BeginTransactionAsync(IsolationLevel, TransactionDisposeBehavior)
Declaration
public Task<CRUDTransaction> BeginTransactionAsync(IsolationLevel iso = IsolationLevel.ReadCommitted, TransactionDisposeBehavior behavior = TransactionDisposeBehavior.CommitOnDispose)
Parameters
Returns
Declaration
public override void Configure(IConfigSectionNode node)
Parameters
Overrides
Delete(Doc, IDataStoreKey)
Declaration
public int Delete(Doc row, IDataStoreKey key = null)
Parameters
Returns
Type |
Description |
System.Int32 |
|
DeleteAsync(Doc, IDataStoreKey)
Declaration
public Task<int> DeleteAsync(Doc row, IDataStoreKey key = null)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Int32> |
|
DoDelete(OracleConnection, OracleTransaction, Doc, IDataStoreKey)
Performs CRUD row deletion. Override to do custom deletion
Declaration
protected virtual int DoDelete(OracleConnection cnn, OracleTransaction transaction, Doc row, IDataStoreKey key = null)
Parameters
Type |
Name |
Description |
Oracle.ManagedDataAccess.Client.OracleConnection |
cnn |
|
Oracle.ManagedDataAccess.Client.OracleTransaction |
transaction |
|
Doc |
row |
|
IDataStoreKey |
key |
|
Returns
Type |
Description |
System.Int32 |
|
DoExecuteWithoutFetch(OracleConnection, OracleTransaction, Query[])
Performs CRUD execution of queries that do not return result set. Override to do custom Query interpretation
Declaration
protected virtual int DoExecuteWithoutFetch(OracleConnection cnn, OracleTransaction transaction, Query[] queries)
Parameters
Type |
Name |
Description |
Oracle.ManagedDataAccess.Client.OracleConnection |
cnn |
|
Oracle.ManagedDataAccess.Client.OracleTransaction |
transaction |
|
Query[] |
queries |
|
Returns
Type |
Description |
System.Int32 |
|
DoGetSchema(OracleConnection, OracleTransaction, Query)
Performs CRUD load without fetching data only returning schema. Override to do custom Query interpretation
Declaration
protected virtual Schema DoGetSchema(OracleConnection cnn, OracleTransaction transaction, Query query)
Parameters
Type |
Name |
Description |
Oracle.ManagedDataAccess.Client.OracleConnection |
cnn |
|
Oracle.ManagedDataAccess.Client.OracleTransaction |
transaction |
|
Query |
query |
|
Returns
DoInsert(OracleConnection, OracleTransaction, Doc, FieldFilterFunc)
Performs CRUD row insert. Override to do custom insertion
Declaration
protected virtual int DoInsert(OracleConnection cnn, OracleTransaction transaction, Doc row, FieldFilterFunc filter = null)
Parameters
Type |
Name |
Description |
Oracle.ManagedDataAccess.Client.OracleConnection |
cnn |
|
Oracle.ManagedDataAccess.Client.OracleTransaction |
transaction |
|
Doc |
row |
|
FieldFilterFunc |
filter |
|
Returns
Type |
Description |
System.Int32 |
|
DoLoad(OracleConnection, OracleTransaction, Query[], Boolean)
Performs CRUD load. Override to do custom Query interpretation
Declaration
protected virtual List<RowsetBase> DoLoad(OracleConnection cnn, OracleTransaction transaction, Query[] queries, bool oneDoc = false)
Parameters
Type |
Name |
Description |
Oracle.ManagedDataAccess.Client.OracleConnection |
cnn |
|
Oracle.ManagedDataAccess.Client.OracleTransaction |
transaction |
|
Query[] |
queries |
|
System.Boolean |
oneDoc |
|
Returns
Type |
Description |
System.Collections.Generic.List<RowsetBase> |
|
DoOpenCursor(OracleConnection, OracleTransaction, Query)
Performs CRUD load. Override to do custom Query interpretation
Declaration
protected virtual Cursor DoOpenCursor(OracleConnection cnn, OracleTransaction transaction, Query query)
Parameters
Type |
Name |
Description |
Oracle.ManagedDataAccess.Client.OracleConnection |
cnn |
|
Oracle.ManagedDataAccess.Client.OracleTransaction |
transaction |
|
Query |
query |
|
Returns
DoSave(OracleConnection, OracleTransaction, RowsetBase[])
Performs CRUD batch save. Override to do custom batch saving
Declaration
protected virtual int DoSave(OracleConnection cnn, OracleTransaction transaction, RowsetBase[] rowsets)
Parameters
Type |
Name |
Description |
Oracle.ManagedDataAccess.Client.OracleConnection |
cnn |
|
Oracle.ManagedDataAccess.Client.OracleTransaction |
transaction |
|
RowsetBase[] |
rowsets |
|
Returns
Type |
Description |
System.Int32 |
|
DoUpdate(OracleConnection, OracleTransaction, Doc, IDataStoreKey, FieldFilterFunc)
Performs CRUD row update. Override to do custom update
Declaration
protected virtual int DoUpdate(OracleConnection cnn, OracleTransaction transaction, Doc row, IDataStoreKey key = null, FieldFilterFunc filter = null)
Parameters
Type |
Name |
Description |
Oracle.ManagedDataAccess.Client.OracleConnection |
cnn |
|
Oracle.ManagedDataAccess.Client.OracleTransaction |
transaction |
|
Doc |
row |
|
IDataStoreKey |
key |
|
FieldFilterFunc |
filter |
|
Returns
Type |
Description |
System.Int32 |
|
DoUpsert(OracleConnection, OracleTransaction, Doc, FieldFilterFunc)
Performs CRUD row upsert. Override to do custom upsertion
Declaration
protected virtual int DoUpsert(OracleConnection cnn, OracleTransaction transaction, Doc row, FieldFilterFunc filter = null)
Parameters
Type |
Name |
Description |
Oracle.ManagedDataAccess.Client.OracleConnection |
cnn |
|
Oracle.ManagedDataAccess.Client.OracleTransaction |
transaction |
|
Doc |
row |
|
FieldFilterFunc |
filter |
|
Returns
Type |
Description |
System.Int32 |
|
ExecuteWithoutFetch(Query[])
Declaration
public int ExecuteWithoutFetch(params Query[] queries)
Parameters
Type |
Name |
Description |
Query[] |
queries |
|
Returns
Type |
Description |
System.Int32 |
|
ExecuteWithoutFetchAsync(Query[])
Declaration
public Task<int> ExecuteWithoutFetchAsync(params Query[] queries)
Parameters
Type |
Name |
Description |
Query[] |
queries |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Int32> |
|
GetSchema(Query)
Declaration
public Schema GetSchema(Query query)
Parameters
Type |
Name |
Description |
Query |
query |
|
Returns
GetSchemaAsync(Query)
Declaration
public Task<Schema> GetSchemaAsync(Query query)
Parameters
Type |
Name |
Description |
Query |
query |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<Schema> |
|
Insert(Doc, FieldFilterFunc)
Declaration
public int Insert(Doc row, FieldFilterFunc filter = null)
Parameters
Returns
Type |
Description |
System.Int32 |
|
InsertAsync(Doc, FieldFilterFunc)
Declaration
public Task<int> InsertAsync(Doc row, FieldFilterFunc filter = null)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Int32> |
|
Load(Query[])
Declaration
public List<RowsetBase> Load(params Query[] queries)
Parameters
Type |
Name |
Description |
Query[] |
queries |
|
Returns
Type |
Description |
System.Collections.Generic.List<RowsetBase> |
|
LoadAsync(Query[])
Declaration
public Task<List<RowsetBase>> LoadAsync(params Query[] queries)
Parameters
Type |
Name |
Description |
Query[] |
queries |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.List<RowsetBase>> |
|
LoadOneDoc(Query)
Declaration
public Doc LoadOneDoc(Query query)
Parameters
Type |
Name |
Description |
Query |
query |
|
Returns
LoadOneDocAsync(Query)
Declaration
public Task<Doc> LoadOneDocAsync(Query query)
Parameters
Type |
Name |
Description |
Query |
query |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<Doc> |
|
LoadOneRowset(Query)
Declaration
public RowsetBase LoadOneRowset(Query query)
Parameters
Type |
Name |
Description |
Query |
query |
|
Returns
LoadOneRowsetAsync(Query)
Declaration
public Task<RowsetBase> LoadOneRowsetAsync(Query query)
Parameters
Type |
Name |
Description |
Query |
query |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<RowsetBase> |
|
MakeScriptQueryHandler(QuerySource)
Declaration
public CRUDQueryHandler MakeScriptQueryHandler(QuerySource querySource)
Parameters
Returns
OpenCursor(Query)
Declaration
public Cursor OpenCursor(Query query)
Parameters
Type |
Name |
Description |
Query |
query |
|
Returns
OpenCursorAsync(Query)
Declaration
public Task<Cursor> OpenCursorAsync(Query query)
Parameters
Type |
Name |
Description |
Query |
query |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<Cursor> |
|
Save(RowsetBase[])
Declaration
public int Save(params RowsetBase[] rowsets)
Parameters
Returns
Type |
Description |
System.Int32 |
|
SaveAsync(RowsetBase[])
Declaration
public Task<int> SaveAsync(params RowsetBase[] rowsets)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Int32> |
|
Update(Doc, IDataStoreKey, FieldFilterFunc)
Declaration
public int Update(Doc row, IDataStoreKey key = null, FieldFilterFunc filter = null)
Parameters
Returns
Type |
Description |
System.Int32 |
|
UpdateAsync(Doc, IDataStoreKey, FieldFilterFunc)
Declaration
public Task<int> UpdateAsync(Doc row, IDataStoreKey key = null, FieldFilterFunc filter = null)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Int32> |
|
Upsert(Doc, FieldFilterFunc)
Declaration
public int Upsert(Doc row, FieldFilterFunc filter = null)
Parameters
Returns
Type |
Description |
System.Int32 |
|
UpsertAsync(Doc, FieldFilterFunc)
Declaration
public Task<int> UpsertAsync(Doc row, FieldFilterFunc filter = null)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Int32> |
|
Implements
System.IDisposable
Extension Methods