ModelDefinition
Assembly: ServiceStack.OrmLite.dll
View Source
Declaration
public class ModelDefinition : object
Properties
Name
View Source
Declaration
public string Name { get; set; }
Alias
View Source
Declaration
public string Alias { get; set; }
Schema
View Source
Declaration
public string Schema { get; set; }
PreCreateTableSql
View Source
Declaration
public string PreCreateTableSql { get; set; }
PostCreateTableSql
View Source
Declaration
public string PostCreateTableSql { get; set; }
PreDropTableSql
View Source
Declaration
public string PreDropTableSql { get; set; }
PostDropTableSql
View Source
Declaration
public string PostDropTableSql { get; set; }
IsInSchema
View Source
Declaration
public bool IsInSchema { get; }
HasAutoIncrementId
View Source
Declaration
public bool HasAutoIncrementId { get; }
HasSequenceAttribute
View Source
Declaration
public bool HasSequenceAttribute { get; }
RowVersion
View Source
Declaration
public FieldDefinition RowVersion { get; set; }
ModelName
View Source
Declaration
public string ModelName { get; }
ModelType
View Source
Declaration
public Type ModelType { get; set; }
PrimaryKey
View Source
Declaration
public FieldDefinition PrimaryKey { get; }
FieldDefinitions
View Source
Declaration
public List<FieldDefinition> FieldDefinitions { get; set; }
FieldDefinitionsArray
View Source
Declaration
public FieldDefinition[] FieldDefinitionsArray { get; }
FieldDefinitionsWithAliases
View Source
Declaration
public FieldDefinition[] FieldDefinitionsWithAliases { get; }
IgnoredFieldDefinitions
View Source
Declaration
public List<FieldDefinition> IgnoredFieldDefinitions { get; set; }
IgnoredFieldDefinitionsArray
View Source
Declaration
public FieldDefinition[] IgnoredFieldDefinitionsArray { get; }
AllFieldDefinitionsArray
View Source
Declaration
public FieldDefinition[] AllFieldDefinitionsArray { get; }
ReferenceFieldDefinitionsArray
View Source
Declaration
public FieldDefinition[] ReferenceFieldDefinitionsArray { get; }
ReferenceFieldNames
View Source
Declaration
public HashSet<string> ReferenceFieldNames { get; }
AutoIdFields
View Source
Declaration
public FieldDefinition[] AutoIdFields { get; }
CompositeIndexes
View Source
Declaration
public List<CompositeIndexAttribute> CompositeIndexes { get; set; }
UniqueConstraints
View Source
Declaration
public List<UniqueConstraintAttribute> UniqueConstraints { get; set; }
Fields
RowVersionName
View Source
Declaration
public const string RowVersionName = null
Methods
GetPrimaryKey(Object)
View Source
Declaration
public object GetPrimaryKey(object instance)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Object | instance |
GetAutoIdFieldDefinitions()
View Source
Declaration
public List<FieldDefinition> GetAutoIdFieldDefinitions()
Returns
List<ServiceStack.OrmLite.FieldDefinition>
GetOrderedFieldDefinitions(ICollection<String>, Func<String, String>)
View Source
Declaration
public FieldDefinition[] GetOrderedFieldDefinitions(ICollection<string> fieldNames, Func<string, string> sanitizeFieldName = null)
Returns
ServiceStack.OrmLite.FieldDefinition[]
Parameters
Type | Name |
---|---|
ICollection<System.String> | fieldNames |
Func<System.String,System.String> | sanitizeFieldName |
GetFieldDefinitionMap(Func<String, String>)
View Source
Declaration
public Dictionary<string, FieldDefinition> GetFieldDefinitionMap(Func<string, string> sanitizeFieldName)
Returns
Dictionary<System.String,ServiceStack.OrmLite.FieldDefinition>
Parameters
Type | Name |
---|---|
Func<System.String,System.String> | sanitizeFieldName |
GetFieldDefinition<T>(Expression<Func<T, Object>>)
View Source
Declaration
public FieldDefinition GetFieldDefinition<T>(Expression<Func<T, object>> field)
Returns
ServiceStack.OrmLite.FieldDefinition
Parameters
Type | Name |
---|---|
Expression<Func<<T>,System.Object>> | field |
Type Parameters
T
AssertFieldDefinition(String)
View Source
Declaration
public FieldDefinition AssertFieldDefinition(string fieldName)
Returns
ServiceStack.OrmLite.FieldDefinition
Parameters
Type | Name |
---|---|
System.String | fieldName |
GetFieldDefinition(String)
View Source
Declaration
public FieldDefinition GetFieldDefinition(string fieldName)
Returns
ServiceStack.OrmLite.FieldDefinition
Parameters
Type | Name |
---|---|
System.String | fieldName |
AssertFieldDefinition(String, Func<String, String>)
View Source
Declaration
public FieldDefinition AssertFieldDefinition(string fieldName, Func<string, string> sanitizeFieldName)
Returns
ServiceStack.OrmLite.FieldDefinition
Parameters
Type | Name |
---|---|
System.String | fieldName |
Func<System.String,System.String> | sanitizeFieldName |
GetFieldDefinition(String, Func<String, String>)
View Source
Declaration
public FieldDefinition GetFieldDefinition(string fieldName, Func<string, string> sanitizeFieldName)
Returns
ServiceStack.OrmLite.FieldDefinition
Parameters
Type | Name |
---|---|
System.String | fieldName |
Func<System.String,System.String> | sanitizeFieldName |
GetQuotedName(String, IOrmLiteDialectProvider)
View Source
Declaration
public string GetQuotedName(string fieldName, IOrmLiteDialectProvider dialectProvider)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | fieldName |
ServiceStack.OrmLite.IOrmLiteDialectProvider | dialectProvider |
GetFieldDefinition(Func<String, Boolean>)
View Source
Declaration
public FieldDefinition GetFieldDefinition(Func<string, bool> predicate)
Returns
ServiceStack.OrmLite.FieldDefinition
Parameters
Type | Name |
---|---|
Func<System.String,System.Boolean> | predicate |
AfterInit()
View Source
Declaration
public void AfterInit()
IsRefField(FieldDefinition)
View Source
Declaration
public bool IsRefField(FieldDefinition fieldDef)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.OrmLite.FieldDefinition | fieldDef |
ToString()
View Source
Declaration
public override string ToString()
Returns
System.String
IsReference(String)
View Source
Declaration
public bool IsReference(string fieldName)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | fieldName |
HasAnyReferences(IEnumerable<String>)
View Source
Declaration
public bool HasAnyReferences(IEnumerable<string> fieldNames)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
IEnumerable<System.String> | fieldNames |