Interface ISchema
- Namespace
- OrpheusInterfaces.Schema
- Assembly
- OrpheusInterfaces.dll
Represents an Orpheus Schema.
public interface ISchema
Properties
DB
Orpheus database.
IOrpheusDatabase DB { get; }
Property Value
- IOrpheusDatabase
Instance of the Orpheus Database
Description
Schema description.
string Description { get; }
Property Value
- string
Schema description
Id
Schema Id.
Guid Id { get; }
Property Value
- Guid
Schema unique id
Name
DB SQL schema name.
string Name { get; }
Property Value
ReferencedSchemas
List of other schemas.
List<ISchema> ReferencedSchemas { get; }
Property Value
SchemaInfoTable
Orpheus schema info table.
string SchemaInfoTable { get; }
Property Value
- string
Table name for the Orpheus schema information table
SchemaModulesTable
Orpheus module definition table.
string SchemaModulesTable { get; }
Property Value
- string
Table name for the Orpheus schema modules table
SchemaObjects
List of schema objects. ISchemaObject
List<ISchemaObject> SchemaObjects { get; }
Property Value
SchemaObjectsTable
Orpheus schema objects table.
string SchemaObjectsTable { get; }
Property Value
- string
Table name for the Orpheus schema objects table
Version
Schema version.
double Version { get; }
Property Value
- double
Schema version
Methods
AddSchemaObject(ISchemaObject)
Adds a schema object to the list.
ISchemaObject AddSchemaObject(ISchemaObject schemaObject)
Parameters
schemaObjectISchemaObject
Returns
- ISchemaObject
The schema object that was added
AddSchemaTable(object, List<ISchemaObject>)
Creates a schema table and initializes table-name, dependencies and generating fields from a model, if provided.
ISchemaTable AddSchemaTable(object model, List<ISchemaObject> dependencies = null)
Parameters
modelobjectModel will be used to auto-generate fields, primary keys etc, for the schema object
dependenciesList<ISchemaObject>List of schema objects, that this objects depends upon
Returns
AddSchemaTable(string, List<ISchemaObject>, object)
Creates a schema table and initializes table-name, dependencies and generating fields from a model, if provided.
ISchemaTable AddSchemaTable(string tableName, List<ISchemaObject> dependencies = null, object model = null)
Parameters
tableNamestringTable name
dependenciesList<ISchemaObject>List of schema objects, that this objects depends upon
modelobjectModel will be used to auto-generate fields, primary keys etc, for the schema object
Returns
AddSchemaTable(Type, List<ISchemaObject>)
Creates a schema table and initializes table-name, dependencies and generating fields from a model, if provided.
ISchemaTable AddSchemaTable(Type modelType, List<ISchemaObject> dependencies = null)
Parameters
modelTypeTypeModel type will be used to auto-generate fields, primary keys etc, for the schema object
dependenciesList<ISchemaObject>List of schema objects, that this objects depends upon
Returns
AddSchemaTable<T>(List<ISchemaObject>)
Creates a schema table and initializes table-name, dependencies and generating fields from a model, if provided.
ISchemaTable AddSchemaTable<T>(List<ISchemaObject> dependencies = null) where T : class
Parameters
dependenciesList<ISchemaObject>The dependencies.
Returns
Type Parameters
TSchema table type
AddSchemaTable<T, D>()
Creates a schema table and initializes table-name, dependencies and generating fields from a model, if provided.
ISchemaTable AddSchemaTable<T, D>()
Returns
Type Parameters
TModel type
DDependency model type
CreateSchemaJoinDefinition()
Creates a join schema definition.
ISchemaJoinDefinition CreateSchemaJoinDefinition()
Returns
CreateSchemaObject()
Creates a schema object.
ISchemaObject CreateSchemaObject()
Returns
CreateSchemaTable()
Creates a table schema object.
ISchemaTable CreateSchemaTable()
Returns
CreateSchemaView()
Creates a view schema object.
ISchemaView CreateSchemaView()
Returns
CreateSchemaViewTable()
Creates a view table schema object.
ISchemaViewTable CreateSchemaViewTable()
Returns
Drop()
Drops schema. Removes all schema objects from the database.
void Drop()
Execute()
Iterate through the schema objects and executes them.
void Execute()
LoadFromFile(string)
Loads schema from an xml file.
void LoadFromFile(string fileName)
Parameters
fileNamestring
RegisterSchema()
Registers schema information, in the schema information table.
void RegisterSchema()
RemoveSchemaObject(ISchemaObject)
Removes from the schema list
void RemoveSchemaObject(ISchemaObject schemaObject)
Parameters
schemaObjectISchemaObjectSchema object to remove
SaveToFile(string)
Saves schema to an xml file.
void SaveToFile(string fileName)
Parameters
fileNamestring
SchemaObjectExists(ISchemaObject)
Returns the guid of the schema object it is created.
Guid SchemaObjectExists(ISchemaObject schemaObject)
Parameters
schemaObjectISchemaObjectSchema object to be checked if it exists
Returns
- Guid
The schema object unique id