23 namespace Deveel.Data.Sql.Schemas {
26 if (transaction == null)
27 throw new ArgumentNullException(
"transaction");
48 GC.SuppressFinalize(
this);
63 tableInfo = tableInfo.AsReadOnly();
69 if (schemaInfo == null)
70 throw new ArgumentException();
72 CreateSchema(schemaInfo);
76 return SchemaExists(objName.
Name);
80 return SchemaExists(objName.
Name);
84 return GetSchema(objName.
Name);
88 throw new NotImplementedException();
92 return DropSchema(objName.
Name);
96 return ResolveSchemaName(objName.
Name, ignoreCase);
102 var comparison = ignoreCase ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal;
104 foreach (var row
in table) {
105 var objSchemaName = row.GetValue(1);
107 throw new InvalidOperationException(
"Invalid column type for SCHEMA name table.");
108 if (objSchemaName.IsNull)
109 throw new InvalidOperationException();
111 var schemaName = objSchemaName.Value.ToString();
112 if (
String.Equals(schemaName, name, comparison))
120 if (schemaInfo == null)
121 throw new ArgumentNullException(
"schemaInfo");
128 if (t.Exists(1, nameObj))
131 var row = t.NewRow();
147 return t.Exists(1, nameObj);
156 return t.Delete(1, nameObj);
160 if (
String.IsNullOrEmpty(name))
161 throw new ArgumentNullException(
"name");
163 throw new NotImplementedException();
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
void CreateSchema(SchemaInfo schemaInfo)
bool AlterObject(IObjectInfo objInfo)
Modifies an existing object managed, identified by IObjectInfo.FullName component of the given specif...
bool DropObject(ObjectName objName)
Deletes a database object handled by this manager from the system.
A long string in the system.
The system implementation of a transaction model that handles isolated operations within a database c...
bool RealObjectExists(ObjectName objName)
Checks if an object really exists in the system.
bool DropSchema(string name)
static DataObject Number(SqlNumber value)
Represents a database object, such as a table, a trigger, a type or a column.
Describes the name of an object within a database.
Exception thrown where various problems occur within the database.
static DataObject String(string s)
static readonly ObjectName SchemaInfoTableName
string Type
Gets the type of the schema that defines the kind of objects it can contains.
string Culture
Gets the culture that will be applied to string comparisons, when not explicitly defined by types...
static NumericType Numeric()
void CreateObject(IObjectInfo objInfo)
Create a new object of the ObjectType given the specifications given.
string Name
Gets the name of the schema.
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
Provides utilities and properties for handling the SYSTEN schema of a database.
DbObjectType ObjectType
Gets the type of objects managed by this instance.
bool SchemaExists(string name)
void Dispose(bool disposing)
string Name
Gets the name of the object being referenced.
static StringType String()
IDbObject GetObject(ObjectName objName)
Gets a database object managed by this manager.
bool ObjectExists(ObjectName objName)
Checks if an object identified by the given name is managed by this instance.
Schema GetSchema(string name)
Defines the contract for the business managers of database objects of a given type.
The simplest implementation of a transaction.
DbObjectType
The kind of objects that can be handled by a database system and its managers
Describes the properties of a schema in a database system.
Defines the metadata properties of a table existing within a database.
void Create()
Initializes the manager into the underlying system.
SchemaManager(ITransaction transaction)
ObjectName ResolveSchemaName(string name, bool ignoreCase)
ObjectName ResolveName(ObjectName objName, bool ignoreCase)
Normalizes the input object name using the case sensitivity specified.