Skip to main content

PostgreSqlDialectProvider

Assembly: ServiceStack.OrmLite.PostgreSQL.dll
View Source
Declaration
public class PostgreSqlDialectProvider : OrmLiteDialectProviderBase<PostgreSqlDialectProvider>, IOrmLiteDialectProvider

Properties

UseReturningForLastInsertId

View Source
Declaration
public bool UseReturningForLastInsertId { get; set; }

AutoIdGuidFunction

View Source
Declaration
public string AutoIdGuidFunction { get; set; }

UseHstore

View Source
Declaration
public bool UseHstore { set; }

Normalize

View Source
Declaration
public bool Normalize { get; set; }

TypesMap

View Source
Declaration
public Dictionary<Type, NpgsqlDbType> TypesMap { get; }

SqlRandom

View Source
Declaration
public override string SqlRandom { get; }

Fields

Instance

View Source
Declaration
public static PostgreSqlDialectProvider Instance

ReservedWords

View Source
Declaration
public static HashSet<string> ReservedWords

RowVersionFieldComparer

View Source
Declaration
public const string RowVersionFieldComparer = "int8in(xidout(xmin))"

NativeTypes

View Source
Declaration
public Dictionary<string, NpgsqlDbType> NativeTypes

Methods

GetColumnDefinition(FieldDefinition)

View Source
Declaration
public override string GetColumnDefinition(FieldDefinition fieldDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef

GetAutoIdDefaultValue(FieldDefinition)

View Source
Declaration
public override string GetAutoIdDefaultValue(FieldDefinition fieldDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef

IsFullSelectStatement(String)

View Source
Declaration
public override bool IsFullSelectStatement(string sql)
Returns

System.Boolean

Parameters
TypeName
System.Stringsql

ShouldSkipInsert(FieldDefinition)

View Source
Declaration
protected override bool ShouldSkipInsert(FieldDefinition fieldDef)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef

ShouldReturnOnInsert(ModelDefinition, FieldDefinition)

View Source
Declaration
protected virtual bool ShouldReturnOnInsert(ModelDefinition modelDef, FieldDefinition fieldDef)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef
ServiceStack.OrmLite.FieldDefinitionfieldDef

HasInsertReturnValues(ModelDefinition)

View Source
Declaration
public override bool HasInsertReturnValues(ModelDefinition modelDef)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef

PrepareParameterizedInsertStatement<T>(IDbCommand, ICollection<String>, Func<FieldDefinition, Boolean>)

View Source
Declaration
public override void PrepareParameterizedInsertStatement<T>(IDbCommand cmd, ICollection<string> insertFields = null, Func<FieldDefinition, bool> shouldInclude = null)
Parameters
TypeName
System.Data.IDbCommandcmd
System.Collections.Generic.ICollection<System.String>insertFields
System.Func<ServiceStack.OrmLite.FieldDefinition,System.Boolean>shouldInclude
Type Parameters
  • T

GetRowVersionSelectColumn(FieldDefinition, String)

View Source
Declaration
public override SelectItem GetRowVersionSelectColumn(FieldDefinition field, string tablePrefix = null)
Returns

ServiceStack.OrmLite.SelectItem

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfield
System.StringtablePrefix

GetRowVersionColumn(FieldDefinition, String)

View Source
Declaration
public override string GetRowVersionColumn(FieldDefinition field, string tablePrefix = null)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfield
System.StringtablePrefix

AppendFieldCondition(StringBuilder, FieldDefinition, IDbCommand)

View Source
Declaration
public override void AppendFieldCondition(StringBuilder sqlFilter, FieldDefinition fieldDef, IDbCommand cmd)
Parameters
TypeName
System.Text.StringBuildersqlFilter
ServiceStack.OrmLite.FieldDefinitionfieldDef
System.Data.IDbCommandcmd

GetQuotedValue(String)

View Source
Declaration
public override string GetQuotedValue(string paramValue)
Returns

System.String

Parameters
TypeName
System.StringparamValue

CreateConnection(String, Dictionary<String, String>)

View Source
Declaration
public override IDbConnection CreateConnection(string connectionString, Dictionary<string, string> options)
Returns

System.Data.IDbConnection

Parameters
TypeName
System.StringconnectionString
System.Collections.Generic.Dictionary<System.String,System.String>options

SqlExpression<T>()

View Source
Declaration
public override SqlExpression<T> SqlExpression<T>()
Returns

ServiceStack.OrmLite.SqlExpression<T>

Type Parameters
  • T

CreateParam()

View Source
Declaration
public override IDbDataParameter CreateParam()
Returns

System.Data.IDbDataParameter

ToTableNamesStatement(String)

View Source
Declaration
public override string ToTableNamesStatement(string schema)
Returns

System.String

Parameters
TypeName
System.Stringschema

ToTableNamesWithRowCountsStatement(Boolean, String)

View Source
Declaration
public override string ToTableNamesWithRowCountsStatement(bool live, string schema)
Returns

System.String

Parameters
TypeName
System.Booleanlive
System.Stringschema

DoesTableExist(IDbCommand, String, String)

View Source
Declaration
public override bool DoesTableExist(IDbCommand dbCmd, string tableName, string schema = null)
Returns

System.Boolean

Parameters
TypeName
System.Data.IDbCommanddbCmd
System.StringtableName
System.Stringschema

DoesTableExistAsync(IDbCommand, String, String, CancellationToken)

View Source
Declaration
public override async Task<bool> DoesTableExistAsync(IDbCommand dbCmd, string tableName, string schema = null, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Data.IDbCommanddbCmd
System.StringtableName
System.Stringschema
System.Threading.CancellationTokentoken

GetSchemas(IDbCommand)

View Source
Declaration
public override List<string> GetSchemas(IDbCommand dbCmd)
Returns

System.Collections.Generic.List<System.String>

Parameters
TypeName
System.Data.IDbCommanddbCmd

GetSchemaTables(IDbCommand)

View Source
Declaration
public override Dictionary<string, List<string>> GetSchemaTables(IDbCommand dbCmd)
Returns

System.Collections.Generic.Dictionary<System.String,System.Collections.Generic.List<System.String>>

Parameters
TypeName
System.Data.IDbCommanddbCmd

DoesSchemaExist(IDbCommand, String)

View Source
Declaration
public override bool DoesSchemaExist(IDbCommand dbCmd, string schemaName)
Returns

System.Boolean

Parameters
TypeName
System.Data.IDbCommanddbCmd
System.StringschemaName

DoesSchemaExistAsync(IDbCommand, String, CancellationToken)

View Source
Declaration
public override async Task<bool> DoesSchemaExistAsync(IDbCommand dbCmd, string schemaName, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Data.IDbCommanddbCmd
System.StringschemaName
System.Threading.CancellationTokentoken

ToCreateSchemaStatement(String)

View Source
Declaration
public override string ToCreateSchemaStatement(string schemaName)
Returns

System.String

Parameters
TypeName
System.StringschemaName

DoesColumnExist(IDbConnection, String, String, String)

View Source
Declaration
public override bool DoesColumnExist(IDbConnection db, string columnName, string tableName, string schema = null)
Returns

System.Boolean

Parameters
TypeName
System.Data.IDbConnectiondb
System.StringcolumnName
System.StringtableName
System.Stringschema

DoesColumnExistAsync(IDbConnection, String, String, String, CancellationToken)

View Source
Declaration
public override async Task<bool> DoesColumnExistAsync(IDbConnection db, string columnName, string tableName, string schema = null, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Data.IDbConnectiondb
System.StringcolumnName
System.StringtableName
System.Stringschema
System.Threading.CancellationTokentoken

ToExecuteProcedureStatement(Object)

View Source
Declaration
public override string ToExecuteProcedureStatement(object objWithProperties)
Returns

System.String

Parameters
TypeName
System.ObjectobjWithProperties

ToAlterColumnStatement(String, String, FieldDefinition)

View Source
Declaration
public override string ToAlterColumnStatement(string schema, string table, FieldDefinition fieldDef)
Returns

System.String

Parameters
TypeName
System.Stringschema
System.Stringtable
ServiceStack.OrmLite.FieldDefinitionfieldDef

ShouldQuote(String)

View Source
Declaration
public override bool ShouldQuote(string name)
Returns

System.Boolean

Parameters
TypeName
System.Stringname

GetQuotedName(String)

View Source
Declaration
public override string GetQuotedName(string name)
Returns

System.String

Parameters
TypeName
System.Stringname

GetQuotedTableName(ModelDefinition)

View Source
Declaration
public override string GetQuotedTableName(ModelDefinition modelDef)
Returns

System.String

Parameters
TypeName
ServiceStack.OrmLite.ModelDefinitionmodelDef

GetTableName(String, String, Boolean)

View Source
Declaration
public override string GetTableName(string table, string schema, bool useStrategy)
Returns

System.String

Parameters
TypeName
System.Stringtable
System.Stringschema
System.BooleanuseStrategy

GetLastInsertIdSqlSuffix<T>()

View Source
Declaration
public override string GetLastInsertIdSqlSuffix<T>()
Returns

System.String

Type Parameters
  • T

GetDbType<T>()

View Source
Declaration
public NpgsqlDbType GetDbType<T>()
Returns

NpgsqlDbType

Type Parameters
  • T

GetDbType(Type)

View Source
Declaration
public NpgsqlDbType GetDbType(Type type)
Returns

NpgsqlDbType

Parameters
TypeName
System.Typetype

SetParameter(FieldDefinition, IDbDataParameter)

View Source
Declaration
public override void SetParameter(FieldDefinition fieldDef, IDbDataParameter p)
Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef
System.Data.IDbDataParameterp

UseRawValue(String)

View Source
Declaration
public virtual bool UseRawValue(string columnDef)
Returns

System.Boolean

Parameters
TypeName
System.StringcolumnDef

GetValue(FieldDefinition, Object)

View Source
Declaration
protected override object GetValue(FieldDefinition fieldDef, object obj)
Returns

System.Object

Parameters
TypeName
ServiceStack.OrmLite.FieldDefinitionfieldDef
System.Objectobj

PrepareStoredProcedureStatement<T>(IDbCommand, T)

View Source
Declaration
public override void PrepareStoredProcedureStatement<T>(IDbCommand cmd, T obj)
Parameters
TypeName
System.Data.IDbCommandcmd
<T>obj
Type Parameters
  • T

ToChangeColumnNameStatement(String, String, FieldDefinition, String)

View Source
Declaration
public override string ToChangeColumnNameStatement(string schema, string table, FieldDefinition fieldDef, string oldColumn)
Returns

System.String

Parameters
TypeName
System.Stringschema
System.Stringtable
ServiceStack.OrmLite.FieldDefinitionfieldDef
System.StringoldColumn

SqlConflict(String, String)

View Source
Declaration
public override string SqlConflict(string sql, string conflictResolution)
Returns

System.String

Parameters
TypeName
System.Stringsql
System.StringconflictResolution

SqlConcat(IEnumerable<Object>)

View Source
Declaration
public override string SqlConcat(IEnumerable<object> args)
Returns

System.String

Parameters
TypeName
System.Collections.Generic.IEnumerable<System.Object>args

SqlCurrency(String, String)

View Source
Declaration
public override string SqlCurrency(string fieldOrValue, string currencySymbol)
Returns

System.String

Parameters
TypeName
System.StringfieldOrValue
System.StringcurrencySymbol

SqlCast(Object, String)

View Source
Declaration
public override string SqlCast(object fieldOrValue, string castAs)
Returns

System.String

Parameters
TypeName
System.ObjectfieldOrValue
System.StringcastAs

Unwrap(IDbConnection)

View Source
Declaration
protected DbConnection Unwrap(IDbConnection db)
Returns

System.Data.Common.DbConnection

Parameters
TypeName
System.Data.IDbConnectiondb

Unwrap(IDbCommand)

View Source
Declaration
protected DbCommand Unwrap(IDbCommand cmd)
Returns

System.Data.Common.DbCommand

Parameters
TypeName
System.Data.IDbCommandcmd

Unwrap(IDataReader)

View Source
Declaration
protected DbDataReader Unwrap(IDataReader reader)
Returns

System.Data.Common.DbDataReader

Parameters
TypeName
System.Data.IDataReaderreader

OpenAsync(IDbConnection, CancellationToken)

View Source
Declaration
public override Task OpenAsync(IDbConnection db, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Data.IDbConnectiondb
System.Threading.CancellationTokentoken

ExecuteReaderAsync(IDbCommand, CancellationToken)

View Source
Declaration
public override Task<IDataReader> ExecuteReaderAsync(IDbCommand cmd, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Data.IDataReader>

Parameters
TypeName
System.Data.IDbCommandcmd
System.Threading.CancellationTokentoken

ExecuteNonQueryAsync(IDbCommand, CancellationToken)

View Source
Declaration
public override Task<int> ExecuteNonQueryAsync(IDbCommand cmd, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Int32>

Parameters
TypeName
System.Data.IDbCommandcmd
System.Threading.CancellationTokentoken

ExecuteScalarAsync(IDbCommand, CancellationToken)

View Source
Declaration
public override Task<object> ExecuteScalarAsync(IDbCommand cmd, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
System.Data.IDbCommandcmd
System.Threading.CancellationTokentoken

ReadAsync(IDataReader, CancellationToken)

View Source
Declaration
public override Task<bool> ReadAsync(IDataReader reader, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
System.Data.IDataReaderreader
System.Threading.CancellationTokentoken

ReaderEach<T>(IDataReader, Func<T>, CancellationToken)

View Source
Declaration
public override async Task<List<T>> ReaderEach<T>(IDataReader reader, Func<T> fn, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<<T>>>

Parameters
TypeName
System.Data.IDataReaderreader
System.Func<<T>>fn
System.Threading.CancellationTokentoken
Type Parameters
  • T

ReaderEach<Return>(IDataReader, Action, Return, CancellationToken)

View Source
Declaration
public override async Task<Return> ReaderEach<Return>(IDataReader reader, Action fn, Return source, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<Return>>

Parameters
TypeName
System.Data.IDataReaderreader
System.Actionfn
<Return>source
System.Threading.CancellationTokentoken
Type Parameters
  • Return

ReaderRead<T>(IDataReader, Func<T>, CancellationToken)

View Source
Declaration
public override async Task<T> ReaderRead<T>(IDataReader reader, Func<T> fn, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<T>>

Parameters
TypeName
System.Data.IDataReaderreader
System.Func<<T>>fn
System.Threading.CancellationTokentoken
Type Parameters
  • T

Implements