Definition at line 50 of file PostgreSqlFactory.cs.
Ntp.Data.Provider.PostgreSqlFactory.PostgreSqlFactory |
( |
| ) |
|
|
inlinepackage |
static string Ntp.Data.Provider.PostgreSqlFactory.BuildConnectionString |
( |
bool |
includeName = true | ) |
|
|
inlinestaticprivate |
Definition at line 139 of file PostgreSqlFactory.cs.
References b.
144 var
b =
new StringBuilder();
145 b.Append($
"Server={Config.Host};");
148 b.Append($
"Port={Config.Port};");
150 b.Append(includeName ? $
"Database={Config.Name};" :
@"Database=postgres;");
152 b.Append($
"User Id={Config.User};");
153 b.Append($
"Password={Config.Pass};");
156 b.Append($
"Timeout={Config.ConnectionTimeout.Value};");
158 b.Append(
Config.
EnableSsl ?
@"SslMode=Require;" :
@"SslMode=Disable;");
161 b.Append($
"Protocol={Config.Protocol.Value};");
static IDatabaseConfiguration Config
override IDbCommand Ntp.Data.Provider.PostgreSqlFactory.CreateCommand |
( |
| ) |
|
|
inlinevirtual |
override IDbConnection Ntp.Data.Provider.PostgreSqlFactory.CreateConnection |
( |
| ) |
|
|
inlinevirtual |
override void Ntp.Data.Provider.PostgreSqlFactory.CreateDatabase |
( |
| ) |
|
|
inlinevirtual |
Implements Ntp.Data.Provider.SqlDatabaseFactory.
Definition at line 79 of file PostgreSqlFactory.cs.
85 command.Connection = connection;
88 int count = Convert.ToInt32(command.ExecuteScalar());
94 command.ExecuteNonQuery();
abstract IDbCommand CreateCommand()
const string CreateDatabaseSql1
static SqlDatabaseFactory Instance
static IDatabaseConfiguration Config
override IDbConnection CreateGenericConnection()
const string CreateDatabaseSql2
override IDbConnection Ntp.Data.Provider.PostgreSqlFactory.CreateGenericConnection |
( |
| ) |
|
|
inlinevirtual |
override IDbDataParameter Ntp.Data.Provider.PostgreSqlFactory.CreateParameter |
( |
string |
name, |
|
|
object |
value |
|
) |
| |
|
inlinevirtual |
override string Ntp.Data.Provider.PostgreSqlFactory.DateAddMinutes |
( |
string |
dateColumn, |
|
|
string |
minuteColumn |
|
) |
| |
|
inlinevirtual |
override string Ntp.Data.Provider.PostgreSqlFactory.PrepareCheckTableSql |
( |
string |
table | ) |
|
|
inlinevirtual |
override string Ntp.Data.Provider.PostgreSqlFactory.PrepareCreateTableSql |
( |
string |
sql | ) |
|
|
inlinevirtual |
override string Ntp.Data.Provider.PostgreSqlFactory.PrepareInsertSql |
( |
string |
sql | ) |
|
|
inlinevirtual |
override string Ntp.Data.Provider.PostgreSqlFactory.PrepareSql |
( |
string |
sql | ) |
|
|
inlinevirtual |
const string Ntp.Data.Provider.PostgreSqlFactory.CheckTableSql |
|
private |
Initial value:=
"SELECT * " +
"FROM information_schema.tables " +
"WHERE table_catalog = lower('{0}') " +
"AND table_name = lower('{1}');"
Definition at line 62 of file PostgreSqlFactory.cs.
const string Ntp.Data.Provider.PostgreSqlFactory.CreateDatabaseSql1 |
|
private |
Initial value:=
"SELECT COUNT(*) FROM pg_database WHERE datname = lower('{0}');"
Definition at line 56 of file PostgreSqlFactory.cs.
const string Ntp.Data.Provider.PostgreSqlFactory.CreateDatabaseSql2 |
|
private |
The documentation for this class was generated from the following file: