SqlServerHierarchyIdTypeConverter
SqlServer Database Converter for the HierarchyId data type https://msdn.microsoft.com/en-us/library/microsoft.sqlserver.types.sqlhierarchyid.aspx
Assembly: ServiceStack.OrmLite.SqlServer.Converters.dll
View Source
Declaration
public class SqlServerHierarchyIdTypeConverter : OrmLiteConverter, IOrmLiteConverter
Properties
ColumnDefinition
View Source
Declaration
public override string ColumnDefinition { get; }
DbType
View Source
Declaration
public override DbType DbType { get; }
Inherited Properties
ColumnDefinition
SQL Column Definition used in CREATE Table.
View Source
Declaration
public abstract string ColumnDefinition { get; }
DbType
Used in DB Params. Defaults to DbType.String
View Source
Declaration
public virtual DbType DbType { get; }
DialectProvider
RDBMS Dialect this Converter is for. Injected at registration.
View Source
Declaration
public IOrmLiteDialectProvider DialectProvider { get; set; }
Methods
ToQuotedString(Type, Object)
View Source
Declaration
public override string ToQuotedString(Type fieldType, object value)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Type | fieldType |
System.Object | value |
InitDbParam(IDbDataParameter, Type)
View Source
Declaration
public override void InitDbParam(IDbDataParameter p, Type fieldType)
Parameters
Type | Name |
---|---|
System.Data.IDbDataParameter | p |
System.Type | fieldType |
FromDbValue(Type, Object)
View Source
Declaration
public override object FromDbValue(Type fieldType, object value)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Type | fieldType |
System.Object | value |
ToDbValue(Type, Object)
View Source
Declaration
public override object ToDbValue(Type fieldType, object value)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Type | fieldType |
System.Object | value |
Inherited Methods
FromDbValue(Type, Object)
Value from DB to Populate on POCO Data Model with
View Source
Declaration
public virtual object FromDbValue(Type fieldType, object value)
Returns
System.Object
Parameters
Type | Name |
---|---|
Type | fieldType |
System.Object | value |
GetValue(IDataReader, Int32, Object[])
Retrieve Value from ADO.NET IDataReader. Defaults to reader.GetValue()
View Source
Declaration
public virtual object GetValue(IDataReader reader, int columnIndex, object[] values)
Returns
System.Object
Parameters
Type | Name |
---|---|
IDataReader | reader |
System.Int32 | columnIndex |
System.Object[] | values |
InitDbParam(IDbDataParameter, Type)
Customize how DB Param is initialized. Useful for supporting RDBMS-specific Types.
View Source
Declaration
public virtual void InitDbParam(IDbDataParameter p, Type fieldType)
Parameters
Type | Name |
---|---|
IDbDataParameter | p |
Type | fieldType |
ToDbValue(Type, Object)
Parameterized value in parameterized queries
View Source
Declaration
public virtual object ToDbValue(Type fieldType, object value)
Returns
System.Object
Parameters
Type | Name |
---|---|
Type | fieldType |
System.Object | value |
ToQuotedString(Type, Object)
Quoted Value in SQL Statement
View Source
Declaration
public virtual string ToQuotedString(Type fieldType, object value)
Returns
System.String
Parameters
Type | Name |
---|---|
Type | fieldType |
System.Object | value |