DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
TypeManager.cs
Go to the documentation of this file.
1 //
2 // Copyright 2010-2015 Deveel
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 using System;
18 
19 using Deveel.Data;
20 using Deveel.Data.Sql;
22 
23 namespace Deveel.Data.Types {
24  public sealed class TypeManager : IObjectManager, ITypeResolver {
25  public TypeManager(ITransaction transaction) {
26  Transaction = transaction;
27  }
28 
29  public ITransaction Transaction { get; private set; }
30 
31  public void Dispose() {
32  }
33 
35  get { return DbObjectType.Type; }
36  }
37 
38  public void Create() {
39  // TODO:
40  }
41 
43  throw new NotImplementedException();
44  }
45 
47  throw new NotImplementedException();
48  }
49 
51  throw new NotImplementedException();
52  }
53 
55  return GetUserType(objName);
56  }
57 
59  throw new NotImplementedException();
60  }
61 
63  throw new NotImplementedException();
64  }
65 
66  public ObjectName ResolveName(ObjectName objName, bool ignoreCase) {
67  throw new NotImplementedException();
68  }
69 
71  var fullTypeName = Transaction.ResolveObjectName(context.TypeName);
72  if (fullTypeName == null)
73  return null;
74 
75  return GetUserType(fullTypeName);
76  }
77 
78  public UserType GetUserType(ObjectName typeName) {
79  throw new NotImplementedException();
80  }
81  }
82 }
bool AlterObject(IObjectInfo objInfo)
Modifies an existing object managed, identified by IObjectInfo.FullName component of the given specif...
SqlType ResolveType(TypeResolveContext context)
bool DropObject(ObjectName objName)
Deletes a database object handled by this manager from the system.
The system implementation of a transaction model that handles isolated operations within a database c...
Definition: Transaction.cs:35
bool RealObjectExists(ObjectName objName)
Checks if an object really exists in the system.
Represents a database object, such as a table, a trigger, a type or a column.
Definition: IDbObject.cs:24
ObjectName ResolveName(ObjectName objName, bool ignoreCase)
Normalizes the input object name using the case sensitivity specified.
Definition: TypeManager.cs:66
Describes the name of an object within a database.
Definition: ObjectName.cs:44
TypeManager(ITransaction transaction)
Definition: TypeManager.cs:25
UserType GetUserType(ObjectName typeName)
Definition: TypeManager.cs:78
void CreateObject(IObjectInfo objInfo)
Create a new object of the ObjectType given the specifications given.
Defines the properties of a specific SQL Type and handles the values compatible.
Definition: SqlType.cs:33
DbObjectType ObjectType
Gets the type of objects managed by this instance.
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.
Defines the contract for the business managers of database objects of a given type.
The simplest implementation of a transaction.
Definition: ITransaction.cs:30
DbObjectType
The kind of objects that can be handled by a database system and its managers
Definition: DbObjectType.cs:27
void Create()
Initializes the manager into the underlying system.
Definition: TypeManager.cs:38