Class SqlModule
public static class SqlModule
- Inheritance
-
SqlModule
- Inherited Members
Methods
config(string, ConnectionStringBuilder)
public static SqlModule.ConnectionStringBuilder config(string extraConfig, SqlModule.ConnectionStringBuilder config)
Parameters
extraConfig
stringconfig
SqlModule.ConnectionStringBuilder
Returns
connect(string)
public static SqlModule.SqlProps connect(string constr)
Parameters
constr
string
Returns
connectFromConfig(ConnectionStringBuilder)
public static SqlModule.SqlProps connectFromConfig(SqlModule.ConnectionStringBuilder connectionConfig)
Parameters
connectionConfig
SqlModule.ConnectionStringBuilder
Returns
convertInfinityDateTime(bool, ConnectionStringBuilder)
public static SqlModule.ConnectionStringBuilder convertInfinityDateTime(bool value, SqlModule.ConnectionStringBuilder config)
Parameters
value
boolconfig
SqlModule.ConnectionStringBuilder
Returns
database(string, ConnectionStringBuilder)
Specifies the database name
public static SqlModule.ConnectionStringBuilder database(string x, SqlModule.ConnectionStringBuilder con)
Parameters
Returns
executeMany(SqlProps)
Executes multiple queries and returns each result set as a distinct table
public static FSharpList<FSharpList<FSharpList<Tuple<string, SqlValue>>>> executeMany(SqlModule.SqlProps props)
Parameters
Returns
executeManyAsync(SqlProps)
public static FSharpAsync<FSharpList<FSharpList<FSharpList<Tuple<string, SqlValue>>>>> executeManyAsync(SqlModule.SqlProps props)
Parameters
Returns
executeManyTask(SqlProps)
public static Task<FSharpList<FSharpList<FSharpList<Tuple<string, SqlValue>>>>> executeManyTask(SqlModule.SqlProps props)
Parameters
Returns
executeManyTaskCt(CancellationToken, SqlProps)
Executes multiple queries and returns each result set as a distinct table
public static Task<FSharpList<FSharpList<FSharpList<Tuple<string, SqlValue>>>>> executeManyTaskCt(CancellationToken cancellationToken, SqlModule.SqlProps props)
Parameters
cancellationToken
CancellationTokenprops
SqlModule.SqlProps
Returns
executeNonQuery(SqlProps)
Executes the query and returns the number of rows affected
public static int executeNonQuery(SqlModule.SqlProps props)
Parameters
Returns
executeNonQueryAsync(SqlProps)
Executes the query as asynchronously and returns the number of rows affected
public static FSharpAsync<int> executeNonQueryAsync(SqlModule.SqlProps props)
Parameters
Returns
- FSharpAsync<int>
executeNonQuerySafe(SqlProps)
Executes the query safely (does not throw) and returns the number of rows affected
public static FSharpResult<int, Exception> executeNonQuerySafe(SqlModule.SqlProps props)
Parameters
Returns
executeNonQuerySafeAsync(SqlProps)
Executes the query safely asynchronously (does not throw) and returns the number of rows affected
public static FSharpAsync<FSharpResult<int, Exception>> executeNonQuerySafeAsync(SqlModule.SqlProps props)
Parameters
Returns
executeNonQuerySafeTask(SqlProps)
Executes the query safely as task (does not throw) and returns the number of rows affected
public static Task<FSharpResult<int, Exception>> executeNonQuerySafeTask(SqlModule.SqlProps props)
Parameters
Returns
executeNonQuerySafeTaskCt(CancellationToken, SqlProps)
Executes the query safely as task (does not throw) and returns the number of rows affected
public static Task<FSharpResult<int, Exception>> executeNonQuerySafeTaskCt(CancellationToken cancellationToken, SqlModule.SqlProps props)
Parameters
cancellationToken
CancellationTokenprops
SqlModule.SqlProps
Returns
executeNonQueryTask(SqlProps)
Executes the query as a task and returns the number of rows affected
public static Task<int> executeNonQueryTask(SqlModule.SqlProps props)
Parameters
Returns
executeNonQueryTaskCt(CancellationToken, SqlProps)
Executes the query as a task and returns the number of rows affected
public static Task<int> executeNonQueryTaskCt(CancellationToken cancellationToken, SqlModule.SqlProps props)
Parameters
cancellationToken
CancellationTokenprops
SqlModule.SqlProps
Returns
executeReaderAsync<t>(FSharpFunc<NpgsqlDataReader, FSharpOption<t>>, SqlProps)
public static FSharpAsync<FSharpList<t>> executeReaderAsync<t>(FSharpFunc<NpgsqlDataReader, FSharpOption<t>> read, SqlModule.SqlProps props)
Parameters
Returns
- FSharpAsync<FSharpList<t>>
Type Parameters
t
executeReaderSafeAsync<a>(SqlProps, FSharpFunc<NpgsqlDataReader, FSharpOption<a>>)
public static FSharpAsync<FSharpResult<FSharpList<a>, Exception>> executeReaderSafeAsync<a>(SqlModule.SqlProps props, FSharpFunc<NpgsqlDataReader, FSharpOption<a>> read)
Parameters
Returns
- FSharpAsync<FSharpResult<FSharpList<a>, Exception>>
Type Parameters
a
executeReaderSafeTaskCt<t>(CancellationToken, FSharpFunc<NpgsqlDataReader, FSharpOption<t>>, SqlProps)
public static Task<FSharpResult<FSharpList<t>, Exception>> executeReaderSafeTaskCt<t>(CancellationToken cancellationToken, FSharpFunc<NpgsqlDataReader, FSharpOption<t>> read, SqlModule.SqlProps props)
Parameters
cancellationToken
CancellationTokenread
FSharpFunc<NpgsqlDataReader, FSharpOption<t>>props
SqlModule.SqlProps
Returns
Type Parameters
t
executeReaderSafeTask<a>(SqlProps, FSharpFunc<NpgsqlDataReader, FSharpOption<a>>)
public static Task<FSharpResult<FSharpList<a>, Exception>> executeReaderSafeTask<a>(SqlModule.SqlProps read, FSharpFunc<NpgsqlDataReader, FSharpOption<a>> props)
Parameters
Returns
Type Parameters
a
executeReaderSafe<t>(FSharpFunc<NpgsqlDataReader, FSharpOption<t>>, SqlProps)
public static FSharpResult<FSharpList<t>, Exception> executeReaderSafe<t>(FSharpFunc<NpgsqlDataReader, FSharpOption<t>> read, SqlModule.SqlProps props)
Parameters
Returns
- FSharpResult<FSharpList<t>, Exception>
Type Parameters
t
executeReaderTaskCt<t>(CancellationToken, SqlProps, FSharpFunc<NpgsqlDataReader, FSharpOption<t>>)
public static Task<FSharpList<t>> executeReaderTaskCt<t>(CancellationToken cancellationToken, SqlModule.SqlProps props, FSharpFunc<NpgsqlDataReader, FSharpOption<t>> read)
Parameters
cancellationToken
CancellationTokenprops
SqlModule.SqlPropsread
FSharpFunc<NpgsqlDataReader, FSharpOption<t>>
Returns
- Task<FSharpList<t>>
Type Parameters
t
executeReaderTask<t>(FSharpFunc<NpgsqlDataReader, FSharpOption<t>>, SqlProps)
public static Task<FSharpList<t>> executeReaderTask<t>(FSharpFunc<NpgsqlDataReader, FSharpOption<t>> read, SqlModule.SqlProps props)
Parameters
Returns
- Task<FSharpList<t>>
Type Parameters
t
executeReader<t>(FSharpFunc<NpgsqlDataReader, FSharpOption<t>>, SqlProps)
public static FSharpList<t> executeReader<t>(FSharpFunc<NpgsqlDataReader, FSharpOption<t>> read, SqlModule.SqlProps props)
Parameters
Returns
- FSharpList<t>
Type Parameters
t
executeScalar(SqlProps)
public static SqlValue executeScalar(SqlModule.SqlProps props)
Parameters
Returns
executeScalarAsync(SqlProps)
public static FSharpAsync<SqlValue> executeScalarAsync(SqlModule.SqlProps props)
Parameters
Returns
- FSharpAsync<SqlValue>
executeScalarSafe(SqlProps)
Executes the query and returns a scalar value safely (does not throw)
public static FSharpResult<SqlValue, Exception> executeScalarSafe(SqlModule.SqlProps props)
Parameters
Returns
executeScalarSafeAsync(SqlProps)
public static FSharpAsync<FSharpResult<SqlValue, Exception>> executeScalarSafeAsync(SqlModule.SqlProps props)
Parameters
Returns
executeScalarSafeTask(SqlProps)
public static Task<FSharpResult<SqlValue, Exception>> executeScalarSafeTask(SqlModule.SqlProps props)
Parameters
Returns
executeScalarSafeTaskCt(CancellationToken, SqlProps)
public static Task<FSharpResult<SqlValue, Exception>> executeScalarSafeTaskCt(CancellationToken cancellationToken, SqlModule.SqlProps props)
Parameters
cancellationToken
CancellationTokenprops
SqlModule.SqlProps
Returns
executeScalarTask(SqlProps)
public static Task<SqlValue> executeScalarTask(SqlModule.SqlProps props)
Parameters
Returns
executeScalarTaskCt(CancellationToken, SqlProps)
public static Task<SqlValue> executeScalarTaskCt(CancellationToken cancellationToken, SqlModule.SqlProps props)
Parameters
cancellationToken
CancellationTokenprops
SqlModule.SqlProps
Returns
executeTable(SqlProps)
public static FSharpList<FSharpList<Tuple<string, SqlValue>>> executeTable(SqlModule.SqlProps props)
Parameters
Returns
executeTableAsync(SqlProps)
public static FSharpAsync<FSharpList<FSharpList<Tuple<string, SqlValue>>>> executeTableAsync(SqlModule.SqlProps props)
Parameters
Returns
executeTableSafe(SqlProps)
public static FSharpResult<FSharpList<FSharpList<Tuple<string, SqlValue>>>, Exception> executeTableSafe(SqlModule.SqlProps props)
Parameters
Returns
executeTableSafeAsync(SqlProps)
public static FSharpAsync<FSharpResult<FSharpList<FSharpList<Tuple<string, SqlValue>>>, Exception>> executeTableSafeAsync(SqlModule.SqlProps props)
Parameters
Returns
executeTableSafeTask(SqlProps)
public static Task<FSharpResult<FSharpList<FSharpList<Tuple<string, SqlValue>>>, Exception>> executeTableSafeTask(SqlModule.SqlProps props)
Parameters
Returns
executeTableSafeTaskCt(CancellationToken, SqlProps)
public static Task<FSharpResult<FSharpList<FSharpList<Tuple<string, SqlValue>>>, Exception>> executeTableSafeTaskCt(CancellationToken cancellationToken, SqlModule.SqlProps props)
Parameters
cancellationToken
CancellationTokenprops
SqlModule.SqlProps
Returns
executeTableTask(SqlProps)
public static FSharpFunc<SqlModule.SqlProps, Task<FSharpList<FSharpList<Tuple<string, SqlValue>>>>> executeTableTask(SqlModule.SqlProps props)
Parameters
Returns
executeTableTaskCt(CancellationToken, SqlProps)
public static Task<FSharpList<FSharpList<Tuple<string, SqlValue>>>> executeTableTaskCt(CancellationToken cancellationToken, SqlModule.SqlProps props)
Parameters
cancellationToken
CancellationTokenprops
SqlModule.SqlProps
Returns
executeTransaction(FSharpList<Tuple<string, FSharpList<FSharpList<Tuple<string, SqlValue>>>>>, SqlProps)
public static FSharpList<int> executeTransaction(FSharpList<Tuple<string, FSharpList<FSharpList<Tuple<string, SqlValue>>>>> queries, SqlModule.SqlProps props)
Parameters
queries
FSharpList<Tuple<string, FSharpList<FSharpList<Tuple<string, SqlValue>>>>>props
SqlModule.SqlProps
Returns
- FSharpList<int>
executeTransactionAsync(FSharpList<Tuple<string, FSharpList<FSharpList<Tuple<string, SqlValue>>>>>, SqlProps)
public static FSharpAsync<FSharpList<int>> executeTransactionAsync(FSharpList<Tuple<string, FSharpList<FSharpList<Tuple<string, SqlValue>>>>> queries, SqlModule.SqlProps props)
Parameters
queries
FSharpList<Tuple<string, FSharpList<FSharpList<Tuple<string, SqlValue>>>>>props
SqlModule.SqlProps
Returns
- FSharpAsync<FSharpList<int>>
executeTransactionSafe(FSharpList<Tuple<string, FSharpList<FSharpList<Tuple<string, SqlValue>>>>>, SqlProps)
public static FSharpResult<FSharpList<int>, Exception> executeTransactionSafe(FSharpList<Tuple<string, FSharpList<FSharpList<Tuple<string, SqlValue>>>>> queries, SqlModule.SqlProps props)
Parameters
queries
FSharpList<Tuple<string, FSharpList<FSharpList<Tuple<string, SqlValue>>>>>props
SqlModule.SqlProps
Returns
executeTransactionSafeAsync(FSharpList<Tuple<string, FSharpList<FSharpList<Tuple<string, SqlValue>>>>>, SqlProps)
public static FSharpAsync<FSharpResult<FSharpList<int>, Exception>> executeTransactionSafeAsync(FSharpList<Tuple<string, FSharpList<FSharpList<Tuple<string, SqlValue>>>>> queries, SqlModule.SqlProps props)
Parameters
queries
FSharpList<Tuple<string, FSharpList<FSharpList<Tuple<string, SqlValue>>>>>props
SqlModule.SqlProps
Returns
fromUri(Uri)
Turns the given postgres Uri into a proper connection string
public static string fromUri(Uri uri)
Parameters
uri
Uri
Returns
fromUriToConfig(Uri)
Creates initial database connection configration from a the Uri components.
It try to find Host
, Username
, Password
, Database
and Port
from the input Uri
.
public static SqlModule.ConnectionStringBuilder fromUriToConfig(Uri uri)
Parameters
uri
Uri
Returns
func(string, SqlProps)
public static SqlModule.SqlProps func(string sql, SqlModule.SqlProps props)
Parameters
Returns
host(string)
public static SqlModule.ConnectionStringBuilder host(string x)
Parameters
x
string
Returns
mapEachRow<a>(FSharpFunc<FSharpList<Tuple<string, SqlValue>>, FSharpOption<a>>, FSharpList<FSharpList<Tuple<string, SqlValue>>>)
public static FSharpList<a> mapEachRow<a>(FSharpFunc<FSharpList<Tuple<string, SqlValue>>, FSharpOption<a>> f, FSharpList<FSharpList<Tuple<string, SqlValue>>> table)
Parameters
f
FSharpFunc<FSharpList<Tuple<string, SqlValue>>, FSharpOption<a>>table
FSharpList<FSharpList<Tuple<string, SqlValue>>>
Returns
- FSharpList<a>
Type Parameters
a
multiline(IEnumerable<string>)
public static string multiline(IEnumerable<string> xs)
Parameters
xs
IEnumerable<string>
Returns
newConnection(SqlProps)
public static NpgsqlConnection newConnection(SqlModule.SqlProps props)
Parameters
Returns
- NpgsqlConnection
parameters(FSharpList<Tuple<string, SqlValue>>, SqlProps)
public static SqlModule.SqlProps parameters(FSharpList<Tuple<string, SqlValue>> ls, SqlModule.SqlProps props)
Parameters
Returns
parseEachRow<a>()
public static FSharpFunc<FSharpList<FSharpList<Tuple<string, SqlValue>>>, FSharpList<a>> parseEachRow<a>()
Returns
Type Parameters
a
parseRow<a>(FSharpList<Tuple<string, SqlValue>>)
public static FSharpOption<a> parseRow<a>(FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<a>
Type Parameters
a
password(string, ConnectionStringBuilder)
Specifies the password of the user that is logging in into the database server
public static SqlModule.ConnectionStringBuilder password(string password, SqlModule.ConnectionStringBuilder config)
Parameters
password
stringconfig
SqlModule.ConnectionStringBuilder
Returns
port(int, ConnectionStringBuilder)
Specifies the port of the database server. If you don't specify the port, the default port of 5432
is used.
public static SqlModule.ConnectionStringBuilder port(int port, SqlModule.ConnectionStringBuilder config)
Parameters
port
intconfig
SqlModule.ConnectionStringBuilder
Returns
prepare(SqlProps)
public static SqlModule.SqlProps prepare(SqlModule.SqlProps props)
Parameters
Returns
query(string, SqlProps)
public static SqlModule.SqlProps query(string sql, SqlModule.SqlProps props)
Parameters
Returns
queryMany(FSharpList<string>, SqlProps)
public static SqlModule.SqlProps queryMany(FSharpList<string> queries, SqlModule.SqlProps props)
Parameters
Returns
readBool(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as a bool
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of bool
and when it is not null.
Returns None
otherwise.
public static FSharpOption<bool> readBool(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<bool>
readBytea(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as a byte array
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of byte array
or bytea
in Postgres and when it is not null.
Returns None
otherwise.
public static FSharpOption<byte[]> readBytea(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<byte[]>
readDate(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as a DateTime
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of DateTime
and when it is not null.
Returns None
otherwise.
public static FSharpOption<DateTime> readDate(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<DateTime>
readDateTimeOffset(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as a DateTimeOffset
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of DateTimeOffset
or (timestamp|time) with timezone
in Postgres and when it is not null.
Returns None
otherwise.
Alias for Sql.readTimeWithTimeZone
public static FSharpOption<DateTimeOffset> readDateTimeOffset(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<DateTimeOffset>
readDecimal(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as a decimal
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of decimal
and when it is not null.
Returns None
otherwise.
public static FSharpOption<decimal> readDecimal(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<decimal>
readHStore(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as a Map<string, string>
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of HStore
which is a key-value dictionary in Postgres.
Returns None
otherwise.
public static FSharpOption<FSharpMap<string, string>> readHStore(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
readInt(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as an int
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of integer and when it is not null.
Returns None
otherwise.
public static FSharpOption<int> readInt(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<int>
readLong(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as an int64
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of int64
and when it is not null.
Returns None
otherwise.
public static FSharpOption<long> readLong(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<long>
readNumber(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as a double
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of double
and when it is not null.
Returns None
otherwise.
public static FSharpOption<double> readNumber(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<double>
readRow(NpgsqlDataReader)
Reads a single row from the data reader synchronously
public static FSharpList<Tuple<string, SqlValue>> readRow(NpgsqlDataReader reader)
Parameters
reader
NpgsqlDataReader
Returns
readRowAsync(NpgsqlDataReader)
Reads a single row from the data reader asynchronously
public static FSharpAsync<Tuple<string, SqlValue>[]> readRowAsync(NpgsqlDataReader reader)
Parameters
reader
NpgsqlDataReader
Returns
readRowTask(NpgsqlDataReader)
Reads a single row from the data reader asynchronously
public static Task<Tuple<string, SqlValue>[]> readRowTask(NpgsqlDataReader reader)
Parameters
reader
NpgsqlDataReader
Returns
readRowTaskCt(CancellationToken, NpgsqlDataReader)
Reads a single row from the data reader asynchronously
public static Task<Tuple<string, SqlValue>[]> readRowTaskCt(CancellationToken cancellationToken, NpgsqlDataReader reader)
Parameters
cancellationToken
CancellationTokenreader
NpgsqlDataReader
Returns
readString(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as an string
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of string
and when it is not null.
Returns None
otherwise.
public static FSharpOption<string> readString(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<string>
readTable(NpgsqlDataReader)
public static FSharpList<FSharpList<Tuple<string, SqlValue>>> readTable(NpgsqlDataReader reader)
Parameters
reader
NpgsqlDataReader
Returns
readTableAsync(NpgsqlDataReader)
public static FSharpAsync<FSharpList<FSharpList<Tuple<string, SqlValue>>>> readTableAsync(NpgsqlDataReader reader)
Parameters
reader
NpgsqlDataReader
Returns
readTableTask(NpgsqlDataReader)
public static Task<FSharpList<FSharpList<Tuple<string, SqlValue>>>> readTableTask(NpgsqlDataReader reader)
Parameters
reader
NpgsqlDataReader
Returns
readTableTaskCt(CancellationToken, NpgsqlDataReader)
public static Task<FSharpList<FSharpList<Tuple<string, SqlValue>>>> readTableTaskCt(CancellationToken cancellationToken, NpgsqlDataReader reader)
Parameters
cancellationToken
CancellationTokenreader
NpgsqlDataReader
Returns
readTime(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as a TimeSpan
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of TimeSpan
and when it is not null.
Returns None
otherwise.
public static FSharpOption<TimeSpan> readTime(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<TimeSpan>
readTimeWithTimeZone(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as a DateTimeOffset
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of DateTimeOffset
or (timestamp|time) with timezone
in Postgres and when it is not null.
Returns None
otherwise.
public static FSharpOption<DateTimeOffset> readTimeWithTimeZone(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<DateTimeOffset>
readUuid(string, FSharpList<Tuple<string, SqlValue>>)
Tries to read the column value as a Guid
from a row based on the provided name of the column.
Returns Some value
when the column exists, when it has the type of Guid
(type Uuid
in Postgres) and when it is not null.
Returns None
otherwise.
public static FSharpOption<Guid> readUuid(string columnName, FSharpList<Tuple<string, SqlValue>> row)
Parameters
Returns
- FSharpOption<Guid>
readValue<a>(FSharpOption<string>, a)
public static SqlValue readValue<a>(FSharpOption<string> columnName, a value)
Parameters
columnName
FSharpOption<string>value
a
Returns
Type Parameters
a
sslMode(SslMode, ConnectionStringBuilder)
Specifies how to manage SSL Mode.
public static SqlModule.ConnectionStringBuilder sslMode(SslMode mode, SqlModule.ConnectionStringBuilder config)
Parameters
mode
SslModeconfig
SqlModule.ConnectionStringBuilder
Returns
str(ConnectionStringBuilder)
public static string str(SqlModule.ConnectionStringBuilder config)
Parameters
config
SqlModule.ConnectionStringBuilder
Returns
toBool(SqlValue)
public static bool toBool(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
toDateTime(SqlValue)
public static DateTime toDateTime(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
toFloat(SqlValue)
public static double toFloat(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
toInt(SqlValue)
public static int toInt(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
toLong(SqlValue)
public static long toLong(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
toString(SqlValue)
public static string toString(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
toTime(SqlValue)
public static TimeSpan toTime(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
trustServerCertificate(bool, ConnectionStringBuilder)
public static SqlModule.ConnectionStringBuilder trustServerCertificate(bool value, SqlModule.ConnectionStringBuilder config)
Parameters
value
boolconfig
SqlModule.ConnectionStringBuilder
Returns
username(string, ConnectionStringBuilder)
public static SqlModule.ConnectionStringBuilder username(string username, SqlModule.ConnectionStringBuilder config)
Parameters
username
stringconfig
SqlModule.ConnectionStringBuilder
Returns
withCert(X509Certificate, SqlProps)
public static SqlModule.SqlProps withCert(X509Certificate cert, SqlModule.SqlProps props)
Parameters
cert
X509Certificateprops
SqlModule.SqlProps
Returns
|NullBool|_|(SqlValue)
public static FSharpOption<bool> |NullBool|_|(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
- FSharpOption<bool>
|NullBytea|_|(SqlValue)
public static FSharpOption<byte[]> |NullBytea|_|(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
- FSharpOption<byte[]>
|NullDate|_|(SqlValue)
public static FSharpOption<DateTime> |NullDate|_|(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
- FSharpOption<DateTime>
|NullDecimal|_|(SqlValue)
public static FSharpOption<decimal> |NullDecimal|_|(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
- FSharpOption<decimal>
|NullHStore|_|(SqlValue)
public static FSharpOption<FSharpMap<string, string>> |NullHStore|_|(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
|NullInt|_|(SqlValue)
public static FSharpOption<int> |NullInt|_|(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
- FSharpOption<int>
|NullLong|_|(SqlValue)
public static FSharpOption<long> |NullLong|_|(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
- FSharpOption<long>
|NullNumber|_|(SqlValue)
public static FSharpOption<double> |NullNumber|_|(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
- FSharpOption<double>
|NullShort|_|(SqlValue)
public static FSharpOption<short> |NullShort|_|(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
- FSharpOption<short>
|NullTimeWithTimeZone|_|(SqlValue)
public static FSharpOption<DateTimeOffset> |NullTimeWithTimeZone|_|(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
- FSharpOption<DateTimeOffset>
|NullUuid|_|(SqlValue)
public static FSharpOption<Guid> |NullUuid|_|(SqlValue _arg1)
Parameters
_arg1
SqlValue
Returns
- FSharpOption<Guid>