18 using System.Collections.Generic;
27 namespace Deveel.Data.Sql {
35 return query.
Session.ObjectExists(objectName);
46 return query.
Session.ObjectExists(objectType, objectName);
50 return GetObject(query, objType, objName,
AccessType.ReadWrite);
60 if (!query.UserCanAccessObject(objType, objName))
61 throw new InvalidOperationException();
63 return query.
Session.GetObject(objType, objName, accessType);
69 throw new InvalidOperationException();
71 query.
Session.CreateObject(objectInfo);
80 if (!query.UserCanDropObject(objectType, objectName))
83 query.
Session.DropObject(objectType, objectName);
88 if (objectInfo == null)
89 throw new ArgumentNullException(
"objectInfo");
93 throw new NotSupportedException();
99 query.
Session.AlterObject(objectInfo);
103 if (query.
Context.CursorExists(name))
105 if (query.
Context.VariableExists(name))
108 return query.
Session.ResolveObjectName(name);
119 return query.
Session.ResolveObjectName(objectType, objectName);
126 return query.
Context.FindVariable(objectName.
Name);
128 return query.
Session.FindObject(objectName);
static bool DropObject(this IQuery query, DbObjectType objectType, ObjectName objectName)
static ObjectName ResolveObjectName(this IQuery query, DbObjectType objectType, ObjectName objectName)
Represents a database object, such as a table, a trigger, a type or a column.
static bool ObjectExists(this IQuery query, DbObjectType objectType, ObjectName objectName)
Describes the name of an object within a database.
static IDbObject GetObject(this IQuery query, DbObjectType objType, ObjectName objName, AccessType accessType)
static bool ObjectExists(this IQuery query, ObjectName objectName)
static ObjectName ResolveObjectName(this IQuery query, string name)
static void AlterObject(this IQuery query, IObjectInfo objectInfo)
static IDbObject GetObject(this IQuery query, DbObjectType objType, ObjectName objName)
string Name
Gets the name of the object being referenced.
static void CreateObject(this IQuery query, IObjectInfo objectInfo)
DbObjectType
The kind of objects that can be handled by a database system and its managers
static IDbObject FindObject(this IQuery query, ObjectName objectName)
new IQueryContext Context