18 using System.Collections.Generic;
66 return GetObject(session, objectType, objectName,
AccessType.ReadWrite);
70 var obj = session.
Transaction.GetObject(objectType, objectName);
72 session.
Access(obj, accessType);
86 return session.
Transaction.ObjectExists(objectName);
90 return session.
Transaction.ObjectExists(objectType, objectName);
98 session.
Transaction.DropObject(objectType, objectName);
106 return session.
Transaction.ResolveObjectName(objectType, objectName);
110 return session.
Transaction.ResolveObjectName(objectName);
119 return session.
Transaction.ResolveTableName(tableName);
123 tableName = session.ResolveTableName(tableName);
128 return session.
Transaction.GetTableInfo(tableName);
132 return session.
Transaction.GetTableType(tableName);
136 session.
Transaction.CreateTable(tableInfo, temporary);
142 session.
Transaction.AddPrimaryKey(tableName, columns, deferred, constraintName);
148 session.
Transaction.AddForeignKey(table, columns, refTable, refColumns, deleteRule, updateRule, deferred, constraintName);
152 session.
Transaction.AddUniqueKey(tableName, columns, deferrability, constraintName);
156 string constraintName) {
157 session.
Transaction.AddCheck(tableName, expression, deferrability, constraintName);
161 session.
Transaction.DropAllTableConstraints(tableName);
165 return session.
Transaction.DropTableConstraint(tableName, constraintName);
169 return session.
Transaction.DropTablePrimaryKey(tableName, constraintName);
173 return session.
Transaction.QueryTablesRelationallyLinkedTo(tableName);
177 return session.
Transaction.QueryTableCheckExpressions(tableName);
181 return session.
Transaction.QueryTablePrimaryKey(tableName);
185 return session.
Transaction.QueryTableUniqueKeys(tableName);
189 return session.
Transaction.QueryTableImportedForeignKeys(refTableName);
193 return session.
Transaction.QueryTableForeignKeys(tableName);
197 throw new NotImplementedException();
207 session.
Access(
new [] {obj}, accessType);
static ITable GetTable(this ISession session, ObjectName tableName)
static ObjectName ResolveObjectName(this ISession session, ObjectName objectName)
static void DropObject(this ISession session, DbObjectType objectType, ObjectName objectName)
static void CreateObject(this ISession session, IObjectInfo objectInfo)
static ConstraintInfo QueryTablePrimaryKey(this ISession session, ObjectName tableName)
Defines the contract to access the data contained into a table of a database.
static void AddCheck(this ISession session, ObjectName tableName, SqlExpression expression, ConstraintDeferrability deferrability, string constraintName)
static void AutoCommit(this ISession session, bool value)
static void CurrentSchema(this ISession session, string value)
static string CurrentSchema(this ISession session)
static IDbObject GetObject(this ISession session, DbObjectType objectType, ObjectName objectName, AccessType accessType)
static bool IgnoreIdentifiersCase(this ISession session)
Represents a database object, such as a table, a trigger, a type or a column.
static ObjectName[] QueryTablesRelationallyLinkedTo(this ISession session, ObjectName tableName)
static bool ObjectExists(this ISession session, ObjectName objectName)
static void CreateTable(this ISession session, TableInfo tableInfo, bool temporary)
static ConstraintInfo[] QueryTableUniqueKeys(this ISession session, ObjectName tableName)
Describes the name of an object within a database.
ITransaction Transaction
Gets the instance of ITransaction that handles the transactional operations of this session...
ConstraintDeferrability
The type of deferrance of a constraint.
static bool AutoCommit(this ISession session)
static string GetTableType(this ISession session, ObjectName tableName)
static void AddForeignKey(this ISession session, ObjectName table, string[] columns, ObjectName refTable, string[] refColumns, ForeignKeyAction deleteRule, ForeignKeyAction updateRule, ConstraintDeferrability deferred, String constraintName)
void Access(IEnumerable< IDbObject > objects, AccessType accessType)
ForeignKeyAction
Enumerates the foreign key referential trigger actions.
static void AlterObject(this ISession session, IObjectInfo objectInfo)
An isolated session to a given database for a given user, encapsulating the transaction for operation...
static void Access(this ISession session, IDbObject obj, AccessType accessType)
string CurrentSchema
Gets the name of the current schema of this session.
QueryParameterStyle
In a SQL query object, this is the form of parameters passed from the client side to the server side...
static void ParameterStyle(this ISession session, QueryParameterStyle value)
static IDbObject FindObject(this ISession session, ObjectName objectName)
static TableInfo GetTableInfo(this ISession session, ObjectName tableName)
static ConstraintInfo[] QueryTableCheckExpressions(this ISession session, ObjectName tableName)
static ObjectName ResolveObjectName(this ISession session, string name)
static ObjectName ResolveObjectName(this ISession session, DbObjectType objectType, ObjectName objectName)
static ConstraintInfo[] QueryTableForeignKeys(this ISession session, ObjectName tableName)
static void IgnoreIdentifiersCase(this ISession session, bool value)
static void AddUniqueKey(this ISession session, ObjectName tableName, string[] columns, ConstraintDeferrability deferrability, string constraintName)
static int DropTableConstraint(this ISession session, ObjectName tableName, string constraintName)
Defines the base class for instances that represent SQL expression tree nodes.
static IDbObject GetObject(this ISession session, DbObjectType objectType, ObjectName objectName)
static QueryParameterStyle ParameterStyle(this ISession session)
static bool DropTablePrimaryKey(this ISession session, ObjectName tableName, string constraintName)
DbObjectType
The kind of objects that can be handled by a database system and its managers
static ObjectName ResolveTableName(this ISession session, ObjectName tableName)
Defines the metadata properties of a table existing within a database.
static ConstraintInfo[] QueryTableImportedForeignKeys(this ISession session, ObjectName refTableName)
static bool ObjectExists(this ISession session, DbObjectType objectType, ObjectName objectName)
static void DropAllTableConstraints(this ISession session, ObjectName tableName)
static void CheckConstraintViolations(this ISession session, ObjectName tableName)
static void AddPrimaryKey(this ISession session, ObjectName tableName, string[] columns, ConstraintDeferrability deferred, string constraintName)