diff --git a/NuGet.Signed/ServiceStack.Aws.Signed/servicestack.aws.signed.nuspec b/NuGet.Signed/ServiceStack.Aws.Signed/servicestack.aws.signed.nuspec index 22f2c21b..2aabba13 100644 --- a/NuGet.Signed/ServiceStack.Aws.Signed/servicestack.aws.signed.nuspec +++ b/NuGet.Signed/ServiceStack.Aws.Signed/servicestack.aws.signed.nuspec @@ -2,7 +2,7 @@ ServiceStack.Aws.Signed - 4.0.0 + 4.5.0 ServiceStack ServiceStack @@ -15,11 +15,11 @@ en-US ServiceStack 2016 and Contributors - - - - - + + + + + diff --git a/NuGet/ServiceStack.Aws/servicestack.aws.nuspec b/NuGet/ServiceStack.Aws/servicestack.aws.nuspec index d347fce5..450fb82a 100644 --- a/NuGet/ServiceStack.Aws/servicestack.aws.nuspec +++ b/NuGet/ServiceStack.Aws/servicestack.aws.nuspec @@ -2,7 +2,7 @@ ServiceStack.Aws - 4.0.0 + 4.5.0 ServiceStack ServiceStack @@ -15,11 +15,11 @@ en-US ServiceStack 2015 and Contributors - - - - - + + + + + diff --git a/build/build-sn.proj b/build/build-sn.proj index 2c3c891b..b03c9e22 100644 --- a/build/build-sn.proj +++ b/build/build-sn.proj @@ -5,7 +5,7 @@ 4 - 0 + 5 $(BUILD_NUMBER) @@ -66,7 +66,7 @@ - version="4\.0[^"]*" + version="4\.5[^"]*" version="$(PackageVersion)" diff --git a/build/build.proj b/build/build.proj index 33d18709..f2a1a87d 100644 --- a/build/build.proj +++ b/build/build.proj @@ -5,7 +5,7 @@ 4 - 0 + 5 $(BUILD_NUMBER) @@ -65,7 +65,7 @@ - version="4\.0[^"]*" + version="4\.5[^"]*" version="$(PackageVersion)" diff --git a/lib/ServiceStack.Authentication.OAuth2.dll b/lib/ServiceStack.Authentication.OAuth2.dll index 1a7843b0..2120b4d6 100644 Binary files a/lib/ServiceStack.Authentication.OAuth2.dll and b/lib/ServiceStack.Authentication.OAuth2.dll differ diff --git a/lib/ServiceStack.Authentication.OAuth2.dll.config b/lib/ServiceStack.Authentication.OAuth2.dll.config index 7795ea21..4dbc2e76 100644 --- a/lib/ServiceStack.Authentication.OAuth2.dll.config +++ b/lib/ServiceStack.Authentication.OAuth2.dll.config @@ -1,27 +1,11 @@ - + - - - - - - - - - - - - - - - - - - + + - \ No newline at end of file + diff --git a/lib/ServiceStack.Authentication.OpenId.dll b/lib/ServiceStack.Authentication.OpenId.dll index 6ffca99f..26813b6f 100644 Binary files a/lib/ServiceStack.Authentication.OpenId.dll and b/lib/ServiceStack.Authentication.OpenId.dll differ diff --git a/lib/ServiceStack.Authentication.OpenId.dll.config b/lib/ServiceStack.Authentication.OpenId.dll.config index ed287c37..4dbc2e76 100644 --- a/lib/ServiceStack.Authentication.OpenId.dll.config +++ b/lib/ServiceStack.Authentication.OpenId.dll.config @@ -1,39 +1,11 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - \ No newline at end of file + diff --git a/lib/ServiceStack.Client.dll b/lib/ServiceStack.Client.dll index 0a054517..2da412c7 100644 Binary files a/lib/ServiceStack.Client.dll and b/lib/ServiceStack.Client.dll differ diff --git a/lib/ServiceStack.Common.dll b/lib/ServiceStack.Common.dll index 303c6b35..c7913907 100644 Binary files a/lib/ServiceStack.Common.dll and b/lib/ServiceStack.Common.dll differ diff --git a/lib/ServiceStack.Interfaces.dll b/lib/ServiceStack.Interfaces.dll index 715a114e..7198fe8f 100644 Binary files a/lib/ServiceStack.Interfaces.dll and b/lib/ServiceStack.Interfaces.dll differ diff --git a/lib/ServiceStack.OrmLite.dll b/lib/ServiceStack.OrmLite.dll index fabc27bd..46f3530e 100644 Binary files a/lib/ServiceStack.OrmLite.dll and b/lib/ServiceStack.OrmLite.dll differ diff --git a/lib/ServiceStack.OrmLite.xml b/lib/ServiceStack.OrmLite.xml index 50736e56..09ba33a5 100644 --- a/lib/ServiceStack.OrmLite.xml +++ b/lib/ServiceStack.OrmLite.xml @@ -54,11 +54,16 @@ Can async queries be pipelined? - + Initialize the command definition + + + For asynchronous operations, the cancellation-token + + Additional state flags that control command behaviour @@ -379,1396 +384,2725 @@ Dapper, a light weight object mapper for ADO.NET - + - Called if the query cache is purged via PurgeQueryCache + Execute a query asynchronously using .NET 4.5 Task. + Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Purge the query cache + Execute a query asynchronously using .NET 4.5 Task. + Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Return a count of all the cached queries by dapper + Execute a single-row query asynchronously using .NET 4.5 Task. - + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Return a list of all the queries cached by dapper + Execute a single-row query asynchronously using .NET 4.5 Task. - - + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Deep diagnostics only: find any hash collisions in the cache + Execute a single-row query asynchronously using .NET 4.5 Task. - + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Clear the registered type handlers + Execute a single-row query asynchronously using .NET 4.5 Task. + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Configure the specified type to be mapped to a given db-type + Execute a query asynchronously using .NET 4.5 Task. - + - Configure the specified type to be processed by a custom handler + Execute a single-row query asynchronously using .NET 4.5 Task. - + - Configure the specified type to be processed by a custom handler + Execute a single-row query asynchronously using .NET 4.5 Task. - + - Configure the specified type to be processed by a custom handler + Execute a single-row query asynchronously using .NET 4.5 Task. - + - Get the DbType that maps to a given value + Execute a single-row query asynchronously using .NET 4.5 Task. - + - OBSOLETE: For internal usage only. Lookup the DbType and handler for a given Type and member + Execute a query asynchronously using .NET 4.5 Task. - - + - Obtains the data as a list; if it is *already* a list, the original object is returned without - any duplication; otherwise, ToList() is invoked. + Execute a single-row query asynchronously using .NET 4.5 Task. - + - Execute parameterized SQL + Execute a single-row query asynchronously using .NET 4.5 Task. - Number of rows affected - + - Execute parameterized SQL + Execute a single-row query asynchronously using .NET 4.5 Task. - Number of rows affected - + - Execute parameterized SQL that selects a single value + Execute a single-row query asynchronously using .NET 4.5 Task. - The first cell selected - + - Execute parameterized SQL that selects a single value + Execute a query asynchronously using .NET 4.5 Task. - The first cell selected - + - Execute parameterized SQL that selects a single value + Execute a query asynchronously using .NET 4.5 Task. - The first cell selected - + - Execute parameterized SQL that selects a single value + Execute a single-row query asynchronously using .NET 4.5 Task. - The first cell selected - + - Execute parameterized SQL and return an + Execute a single-row query asynchronously using .NET 4.5 Task. - An that can be used to iterate over the results of the SQL query. - - This is typically used when the results of a query are not processed by Dapper, for example, used to fill a - or . - - - - - - - + - Execute parameterized SQL and return an + Execute a single-row query asynchronously using .NET 4.5 Task. - An that can be used to iterate over the results of the SQL query. - - This is typically used when the results of a query are not processed by Dapper, for example, used to fill a - or . - - + - Execute parameterized SQL and return an + Execute a single-row query asynchronously using .NET 4.5 Task. - An that can be used to iterate over the results of the SQL query. - - This is typically used when the results of a query are not processed by Dapper, for example, used to fill a - or . - - + - Return a sequence of dynamic objects with properties matching the columns + Execute a command asynchronously using .NET 4.5 Task. - Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Return a dynamic object with properties matching the columns + Execute a command asynchronously using .NET 4.5 Task. - Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Return a dynamic object with properties matching the columns + Maps a query to objects - Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + The first type in the recordset + The second type in the recordset + The return type + + + + + + + The field we should split and read the second object from (default: id) + Number of seconds before command execution timeout + Is it a stored proc or a batch? + - + - Return a dynamic object with properties matching the columns + Maps a query to objects - Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + The first type in the recordset + The second type in the recordset + The return type + + The field we should split and read the second object from (default: id) + The command to execute + + - + - Return a dynamic object with properties matching the columns + Maps a query to objects - Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + + + + + + + + The Field we should split and read the second object from (default: id) + Number of seconds before command execution timeout + + - + - Executes a query, returning the data typed as per T + Maps a query to objects - A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - + + + + + + The field we should split and read the second object from (default: id) + The command to execute + + - + - Executes a single-row query, returning the data typed as per T + Perform a multi mapping query with 4 input parameters - A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - + + + + + + + + + + + + + + + - + - Executes a single-row query, returning the data typed as per T + Perform a multi mapping query with 4 input parameters - A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - + + + + + + + The field we should split and read the second object from (default: id) + The command to execute + + - + - Executes a single-row query, returning the data typed as per T + Perform a multi mapping query with 5 input parameters - A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - - + - Executes a single-row query, returning the data typed as per T + Perform a multi mapping query with 5 input parameters - A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - - + - Executes a single-row query, returning the data typed as per the Type suggested + Perform a multi mapping query with 6 input parameters - A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - - + - Executes a single-row query, returning the data typed as per the Type suggested + Perform a multi mapping query with 6 input parameters - A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - - + - Executes a single-row query, returning the data typed as per the Type suggested + Perform a multi mapping query with 7 input parameters - A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - - + - Executes a single-row query, returning the data typed as per the Type suggested + Perform a multi mapping query with 7 input parameters - A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - - + - Executes a single-row query, returning the data typed as per the Type suggested + Perform a multi mapping query with arbitrary input parameters - A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - + The return type + + + array of types in the recordset + + + + + The Field we should split and read the second object from (default: id) + Number of seconds before command execution timeout + Is it a stored proc or a batch? + - + - Executes a query, returning the data typed as per T + Execute a command that returns multiple result sets, and access each in turn - the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object - A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - - + - Executes a query, returning the data typed as per T + Execute a command that returns multiple result sets, and access each in turn - the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object - A single instance or null of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - - + - Executes a query, returning the data typed as per T + Execute parameterized SQL and return an - the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object - A single or null instance of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - + An that can be used to iterate over the results of the SQL query. + + This is typically used when the results of a query are not processed by Dapper, for example, used to fill a + or . + + + + + + - + - Executes a query, returning the data typed as per T + Execute parameterized SQL and return an - the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object - A single instance of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - + An that can be used to iterate over the results of the SQL query. + + This is typically used when the results of a query are not processed by Dapper, for example, used to fill a + or . + - + - Executes a query, returning the data typed as per T + Execute parameterized SQL that selects a single value - the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object - A single instance of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is - created per row, and a direct column-name===member-name mapping is assumed (case insensitive). - + The first cell selected - + - Execute a command that returns multiple result sets, and access each in turn + Execute parameterized SQL that selects a single value + The first cell selected - + - Execute a command that returns multiple result sets, and access each in turn + Execute parameterized SQL that selects a single value + The first cell selected - + - Maps a query to objects + Execute parameterized SQL that selects a single value + + The first cell selected + + + + Called if the query cache is purged via PurgeQueryCache + + + + + Purge the query cache + + + + + Return a count of all the cached queries by dapper - The first type in the record set - The second type in the record set - The return type - - - - - - - The Field we should split and read the second object from (default: id) - Number of seconds before command execution timeout - Is it a stored proc or a batch? - + - Maps a query to objects + Return a list of all the queries cached by dapper + + + + + + + Deep diagnostics only: find any hash collisions in the cache - - - - - - - - - - - The Field we should split and read the second object from (default: id) - Number of seconds before command execution timeout - - + + + Clear the registered type handlers + + + + + Configure the specified type to be mapped to a given db-type + + + + + Configure the specified type to be processed by a custom handler + + + + + Configure the specified type to be processed by a custom handler + + + + + Configure the specified type to be processed by a custom handler + + + + + Get the DbType that maps to a given value + + + + + OBSOLETE: For internal usage only. Lookup the DbType and handler for a given Type and member + + + + + Obtains the data as a list; if it is *already* a list, the original object is returned without + any duplication; otherwise, ToList() is invoked. + + + + + Execute parameterized SQL + + Number of rows affected + + + + Execute parameterized SQL + + Number of rows affected + + + + Execute parameterized SQL that selects a single value + + The first cell selected + + + + Execute parameterized SQL that selects a single value + + The first cell selected + + + + Execute parameterized SQL that selects a single value + + The first cell selected + + + + Execute parameterized SQL that selects a single value + + The first cell selected + + + + Execute parameterized SQL and return an + + An that can be used to iterate over the results of the SQL query. + + This is typically used when the results of a query are not processed by Dapper, for example, used to fill a + or . + + + + + + + + + + Execute parameterized SQL and return an + + An that can be used to iterate over the results of the SQL query. + + This is typically used when the results of a query are not processed by Dapper, for example, used to fill a + or . + + + + + Execute parameterized SQL and return an + + An that can be used to iterate over the results of the SQL query. + + This is typically used when the results of a query are not processed by Dapper, for example, used to fill a + or . + + + + + Return a sequence of dynamic objects with properties matching the columns + + Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Return a dynamic object with properties matching the columns + + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Return a dynamic object with properties matching the columns + + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Return a dynamic object with properties matching the columns + + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Return a dynamic object with properties matching the columns + + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Executes a query, returning the data typed as per T + + A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a single-row query, returning the data typed as per T + + A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a single-row query, returning the data typed as per T + + A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a single-row query, returning the data typed as per T + + A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a single-row query, returning the data typed as per T + + A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a single-row query, returning the data typed as per the Type suggested + + A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a single-row query, returning the data typed as per the Type suggested + + A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a single-row query, returning the data typed as per the Type suggested + + A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a single-row query, returning the data typed as per the Type suggested + + A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a single-row query, returning the data typed as per the Type suggested + + A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a query, returning the data typed as per T + + the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object + A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a query, returning the data typed as per T + + the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object + A single instance or null of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a query, returning the data typed as per T + + the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object + A single or null instance of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a query, returning the data typed as per T + + the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object + A single instance of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Executes a query, returning the data typed as per T + + the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object + A single instance of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is + created per row, and a direct column-name===member-name mapping is assumed (case insensitive). + + + + + Execute a command that returns multiple result sets, and access each in turn + + + + + Execute a command that returns multiple result sets, and access each in turn + + + + + Maps a query to objects + + The first type in the record set + The second type in the record set + The return type + + + + + + + The Field we should split and read the second object from (default: id) + Number of seconds before command execution timeout + Is it a stored proc or a batch? + + + + + Maps a query to objects + + + + + + + + + + + + The Field we should split and read the second object from (default: id) + Number of seconds before command execution timeout + + + + + + Perform a multi mapping query with 4 input parameters + + + + + + + + + + + + + + + + + + + + Perform a multi mapping query with 5 input parameters + + + + + + + + + + + + + + + + + + + + + Perform a multi mapping query with 6 input parameters + + + + + + + + + + + + + + + + + + + + + + Perform a multi mapping query with 7 input parameters + + + + + + + + + + + + + + + + + + + + + + + Perform a multi mapping query with arbitrary input parameters + + The return type + + + array of types in the record set + + + + + The Field we should split and read the second object from (default: id) + Number of seconds before command execution timeout + Is it a stored proc or a batch? + + + + + Internal use only + + + + + + + Internal use only + + + + + Internal use only + + + + + Internal use only + + + + + OBSOLETE: For internal usage only. Sanitizes the paramter value with proper type casting. + + + + + Replace all literal tokens with their text form + + + + + Convert numeric values to their string form for SQL literal purposes + + + + + Internal use only + + + + + Gets type-map for the given type + + Type map instance, default is to create new instance of DefaultTypeMap + + + + Gets type-map for the given type + + Type map implementation, DefaultTypeMap instance if no override present + + + + Set custom mapping for type deserializers + + Entity type to override + Mapping rules impementation, null to remove custom map + + + + Internal use only + + + + + + + + + + + Throws a data exception, only used internally + + + + + How should connection strings be compared for equivalence? Defaults to StringComparer.Ordinal. + Providing a custom implementation can be useful for allowing multi-tenancy databases with identical + schema to share strategies. Note that usual equivalence rules apply: any equivalent connection strings + MUST yield the same hash-code. + + + + + Key used to indicate the type name associated with a DataTable + + + + + Used to pass a DataTable as a TableValuedParameter + + + + + Associate a DataTable with a type name + + + + + Fetch the type name associated with a DataTable + + + + + Used to pass a IEnumerable<SqlDataRecord> as a TableValuedParameter + + + + + Dummy type for excluding from multi-map + + + + + The grid reader provides interfaces for reading multiple result sets from a Dapper query + + + + + Read the next grid of results, returned as a dynamic object + + Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Read an individual row of the next grid of results, returned as a dynamic object + + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Read an individual row of the next grid of results, returned as a dynamic object + + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Read an individual row of the next grid of results, returned as a dynamic object + + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Read an individual row of the next grid of results, returned as a dynamic object + + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Read the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read the next grid of results, returned as a dynamic object + + Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Read an individual row of the next grid of results, returned as a dynamic object + + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Read an individual row of the next grid of results, returned as a dynamic object + + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Read an individual row of the next grid of results, returned as a dynamic object + + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Read an individual row of the next grid of results, returned as a dynamic object + + Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> + + + + Read the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read an individual row of the next grid of results + + + + + Read multiple objects from a single record set on the grid + + + + + Read multiple objects from a single record set on the grid + + + + + Read multiple objects from a single record set on the grid + + + + + Read multiple objects from a single record set on the grid + + + + + Read multiple objects from a single record set on the grid + + + + + Read multiple objects from a single record set on the grid + + + + + Read multiple objects from a single record set on the grid + + + + + Has the underlying reader been consumed? + + + + + The command associated with the reader + + + + + Dispose the grid, closing and disposing both the underlying reader and command. + + + + + Implement this interface to pass an arbitrary db specific parameter to Dapper + + + + + Add the parameter needed to the command before it executes + + The raw command prior to execution + Parameter name + + + + Parses a data reader to a sequence of data of the supplied type. Used for deserializing a reader without a connection, etc. + + + + + Parses a data reader to a sequence of data of the supplied type (as object). Used for deserializing a reader without a connection, etc. + + + + + Parses a data reader to a sequence of dynamic. Used for deserializing a reader without a connection, etc. + + + + + Gets the row parser for a specific row on a data reader. This allows for type switching every row based on, for example, a TypeId column. + You could return a collection of the base type but have each more specific. + + The data reader to get the parser for the current row from + The type to get the parser for + The start column index of the object (default 0) + The length of columns to read (default -1 = all fields following startIndex) + Return null if we can't find the first column? (default false) + A parser for this specific object from this row. + + + + Gets the row parser for a specific row on a data reader. This allows for type switching every row based on, for example, a TypeId column. + You could return a collection of the base type but have each more specific. + + The data reader to get the parser for the current row from + The type to get the parser for + The start column index of the object (default 0) + The length of columns to read (default -1 = all fields following startIndex) + Return null if we can't find the first column? (default false) + A parser for this specific object from this row. + + var result = new List<BaseType>(); + using (var reader = connection.ExecuteReader(@" + select 'abc' as Name, 1 as Type, 3.0 as Value + union all + select 'def' as Name, 2 as Type, 4.0 as Value")) + { + if (reader.Read()) + { + var toFoo = reader.GetRowParser<BaseType>(typeof(Foo)); + var toBar = reader.GetRowParser<BaseType>(typeof(Bar)); + var col = reader.GetOrdinal("Type"); + do + { + switch (reader.GetInt32(col)) + { + case 1: + result.Add(toFoo(reader)); + break; + case 2: + result.Add(toBar(reader)); + break; + } + } while (reader.Read()); + } + } + + abstract class BaseType + { + public abstract int Type { get; } + } + class Foo : BaseType + { + public string Name { get; set; } + public override int Type => 1; + } + class Bar : BaseType + { + public float Value { get; set; } + public override int Type => 2; + } + + + + + Identity of a cached query in Dapper, used for extensibility + + + + + Create an identity for use with DynamicParameters, internal use only + + + + + + + + + + + + + + The sql + + + + + The command type + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Compare 2 Identity objects + + + + + + + Implement this interface to pass an arbitrary db specific set of parameters to Dapper + + + + + Add all the parameters needed to the command just before it executes + + The raw command prior to execution + Information about the query + + + + Implements this interface to provide custom member mapping + + + + + Source DataReader column name + + + + + Target member type + + + + + Target property + + + + + Target field + + + + + Target constructor parameter + + + + + Extends IDynamicParameters with facilities for executing callbacks after commands have completed + + + + + Invoked when the command has executed + + + + + Extends IDynamicParameters providing by-name lookup of parameter values + + + + + Get the value of the specified parameter (return null if not found) + + + + + Implement this interface to perform custom type-based parameter handling and value parsing + + + + + Assign the value of a parameter before a command executes + + The parameter to configure + Parameter value + + + + Parse a database value back to a typed value + + The value from the database + The type to parse to + The typed value + + + + Implement this interface to change default mapping of reader columns to type members + + + + + Finds best constructor + + DataReader column names + DataReader column types + Matching constructor or default one + + + + Returns a constructor which should *always* be used. + + Parameters will be default values, nulls for reference types and zero'd for value types. + + Use this class to force object creation away from parameterless constructors you don't control. + + + + + Gets mapping for constructor parameter + + Constructor to resolve + DataReader column name + Mapping implementation + + + + Gets member mapping for column + + DataReader column name + Mapping implementation + + + + This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example), + and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE** + equality. The type is fully thread-safe. + + + + + Represents a placeholder for a value that should be replaced as a literal value in the resulting sql + + + + + The text in the original command that should be replaced + + + + + The name of the member referred to by the token + + + + + Permits specifying certain SqlMapper values globally. + + + + + Resets all Settings to their default values + + + + + Specifies the default Command Timeout for all Queries + + + + + Indicates whether nulls in data are silently ignored (default) vs actively applied and assigned to members + + + + + Should list expansions be padded with null-valued parameters, to prevent query-plan saturation? For example, + an 'in @foo' expansion with 7, 8 or 9 values will be sent as a list of 10 values, with 3, 2 or 1 of them null. + The padding size is relative to the size of the list; "next 10" under 150, "next 50" under 500, + "next 100" under 1500, etc. + + + Caution: this should be treated with care if your DB provider (or the specific configuration) allows for null + equality (aka "ansi nulls off"), as this may change the intent of your query; as such, this is disabled by + default and must be enabled. + + + + + If set (non-negative), when performing in-list expansions of integer types ("where id in @ids", etc), switch to a string_split based + operation if there are more than this many elements. Note that this feautre requires SQL Server 2016 / compatibility level 130 (or above). + + + + + Base-class for simple type-handlers + + + + + Assign the value of a parameter before a command executes + + The parameter to configure + Parameter value + + + + Parse a database value back to a typed value + + The value from the database + The typed value + + + + Base-class for simple type-handlers that are based around strings + + + + + Parse a string into the expected type (the string will never be null) + + + + + Format an instace into a string (the instance will never be null) + + + + + Assign the value of a parameter before a command executes + + The parameter to configure + Parameter value + + + + Parse a database value back to a typed value + + The value from the database + The typed value + + + + Not intended for direct usage + + + + + Not intended for direct usage + + + + + Not intended for direct usage + + + + + A type handler for data-types that are supported by the underlying provider, but which need + a well-known UdtTypeName to be specified + + + + + Creates a new instance of UdtTypeHandler with the specified UdtTypeName + + + + + Used to pass a DataTable as a TableValuedParameter + + + + + Create a new instance of TableValuedParameter + + + + + Create a new instance of TableValuedParameter + + + + + Describes a reader that controls the lifetime of both a command and a reader, + exposing the downstream command/reader as properties. + + + + + Obtain the underlying reader + + + + + Obtain the underlying command + + + + + RDBMS Dialect this Converter is for. Injected at registration. + + + + + SQL Column Definiton used in CREATE Table. + + + + + Used in DB Params. Defaults to DbType.String + + + + + Quoted Value in SQL Statement + + + + + Customize how DB Param is initialized. Useful for supporting RDBMS-specific Types. + + + + + Parameterized value in parameterized queries + + + + + Value from DB to Populate on POCO Data Model with + + + + + Retrieve Value from ADO.NET IDataReader. Defaults to reader.GetValue() + + + + + For Types that are natively supported by RDBMS's and shouldn't be quoted + + + + + Returns results from using an SqlFormat query. E.g: + db.SelectFmt<Person>("Age > {0}", 40) + db.SelectFmt<Person>("SELECT * FROM Person WHERE Age > {0}", 40) + + + + + Returns a partial subset of results from the specified tableType using a SqlFormat query. E.g: + db.SelectFmt<EntityWithId>(typeof(Person), "Age > {0}", 40) + + + + + Returns a single scalar value using an SqlFormat query. E.g: + db.ScalarFmt<int>("SELECT COUNT(*) FROM Person WHERE Age > {0}", 40) + + + + + Returns the first column in a List using a SqlFormat query. E.g: + db.ColumnFmt<string>("SELECT LastName FROM Person WHERE Age = {0}", 27) + + + - Perform a multi mapping query with 4 input parameters + Returns the distinct first column values in a HashSet using an SqlFormat query. E.g: + db.ColumnDistinctFmt<int>("SELECT Age FROM Person WHERE Age < {0}", 50) - - - - - - - - - - - - - - - - + - Perform a multi mapping query with 5 input parameters + Returns an Dictionary<K, List<V>> grouping made from the first two columns using an SqlFormat query. E.g: + db.LookupFmt<int, string>("SELECT Age, LastName FROM Person WHERE Age < {0}", 50) - - - - - - - - - - - - - - - - - + - Perform a multi mapping query with 6 input parameters + Returns a Dictionary from the first 2 columns: Column 1 (Keys), Column 2 (Values) using an SqlFormat query. E.g: + db.DictionaryFmt<int, string>("SELECT Id, LastName FROM Person WHERE Age < {0}", 50) - - - - - - - - - - - - - - - - - - + - Perform a multi mapping query with 7 input parameters + Returns true if the Query returns any records, using an SqlFormat query. E.g: + db.ExistsFmt<Person>("Age = {0}", 42) + db.ExistsFmt<Person>("SELECT * FROM Person WHERE Age = {0}", 50) - - - - - - - - - - - - - - - - - - - + - Perform a multi mapping query with arbitrary input parameters + Returns true if the Query returns any records that match the SqlExpression lambda, E.g: + db.Exists<Person>(q => q.Where(x => x.Age < 50)) - The return type - - - array of types in the record set - - - - - The Field we should split and read the second object from (default: id) - Number of seconds before command execution timeout - Is it a stored proc or a batch? - - + - Internal use only + Returns results from a Stored Procedure using an SqlFormat query. E.g: + - - - + - Internal use only + Returns results from using an SqlFormat query. E.g: + db.SelectFmt<Person>("Age > {0}", 40) + db.SelectFmt<Person>("SELECT * FROM Person WHERE Age > {0}", 40) - + - Internal use only + Returns a partial subset of results from the specified tableType using a SqlFormat query. E.g: + db.SelectFmt<EntityWithId>(typeof(Person), "Age > {0}", 40) - + - Internal use only + Returns a lazyily loaded stream of results using an SqlFilter query. E.g: + db.SelectLazyFmt<Person>("Age > {0}", 40) - + - OBSOLETE: For internal usage only. Sanitizes the paramter value with proper type casting. + Returns the first result using a SqlFormat query. E.g: + db.SingleFmt<Person>("Age = {0}", 42) - + - Replace all literal tokens with their text form + Returns a single scalar value using an SqlFormat query. E.g: + db.ScalarFmt<int>("SELECT COUNT(*) FROM Person WHERE Age > {0}", 40) - + - Convert numeric values to their string form for SQL literal purposes + Returns the first column in a List using a SqlFormat query. E.g: + db.ColumnFmt<string>("SELECT LastName FROM Person WHERE Age = {0}", 27) - + - Internal use only + Returns the distinct first column values in a HashSet using an SqlFormat query. E.g: + db.ColumnDistinctFmt<int>("SELECT Age FROM Person WHERE Age < {0}", 50) - + - Gets type-map for the given type + Returns an Dictionary<K, List<V>> grouping made from the first two columns using an SqlFormat query. E.g: + db.LookupFmt<int, string>("SELECT Age, LastName FROM Person WHERE Age < {0}", 50) - Type map instance, default is to create new instance of DefaultTypeMap - + - Gets type-map for the given type + Returns a Dictionary from the first 2 columns: Column 1 (Keys), Column 2 (Values) using an SqlFormat query. E.g: + db.DictionaryFmt<int, string>("SELECT Id, LastName FROM Person WHERE Age < {0}", 50) - Type map implementation, DefaultTypeMap instance if no override present - + - Set custom mapping for type deserializers + Returns true if the Query returns any records, using an SqlFormat query. E.g: + db.ExistsFmt<Person>("Age = {0}", 42) + db.ExistsFmt<Person>("SELECT * FROM Person WHERE Age = {0}", 50) - Entity type to override - Mapping rules impementation, null to remove custom map - + - Internal use only + Returns true if the Query returns any records that match the SqlExpression lambda, E.g: + db.Exists<Person>(q => q.Where(x => x.Age < 50)) - - - - - - - + - Throws a data exception, only used internally + Returns results from using an SqlExpression lambda. E.g: + db.Select<Person>(q => q.Where(x => x.Age > 40)) - + - How should connection strings be compared for equivalence? Defaults to StringComparer.Ordinal. - Providing a custom implementation can be useful for allowing multi-tenancy databases with identical - schema to share strategies. Note that usual equivalence rules apply: any equivalent connection strings - MUST yield the same hash-code. + Project results from a number of joined tables into a different model - + - Key used to indicate the type name associated with a DataTable + Returns a single result from using an SqlExpression lambda. E.g: + db.Single<Person>(q => q.Where(x => x.Age == 42)) - + - Used to pass a DataTable as a TableValuedParameter + Returns the first result using a SqlFormat query. E.g: + db.SingleFmt<Person>("Age = {0}", 42) - + - Associate a DataTable with a type name + Returns the count of rows that match the SqlExpression lambda, E.g: + db.Count<Person>(q => q.Where(x => x.Age < 50)) - + - Fetch the type name associated with a DataTable + Returns results with references from using an SqlExpression lambda. E.g: + db.LoadSelectAsync<Person>(q => q.Where(x => x.Age > 40)) - + - Used to pass a IEnumerable<SqlDataRecord> as a TableValuedParameter + Create a new SqlExpression builder allowing typed LINQ-like queries. - + - Dummy type for excluding from multi-map + Returns results from using an SqlExpression lambda. E.g: + db.Select<Person>(q => q.Where(x => x.Age > 40)) - + - The grid reader provides interfaces for reading multiple result sets from a Dapper query + Project results from a number of joined tables into a different model - + - Read the next grid of results, returned as a dynamic object + Project results from a number of joined tables into a different model - Note: each row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Read an individual row of the next grid of results, returned as a dynamic object + Returns a single result from using an SqlExpression lambda. E.g: + db.Single<Person>(q => q.Where(x => x.Age == 42)) - Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Read an individual row of the next grid of results, returned as a dynamic object + Returns the count of rows that match the SqlExpression lambda, E.g: + db.Count<Person>(q => q.Where(x => x.Age < 50)) - Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Read an individual row of the next grid of results, returned as a dynamic object + Returns results with references from using an SqlExpression lambda. E.g: + db.LoadSelect<Person>(q => q.Where(x => x.Age > 40)) - Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Read an individual row of the next grid of results, returned as a dynamic object + Returns results with references from using an SqlExpression lambda. E.g: + db.LoadSelect<Person>(q => q.Where(x => x.Age > 40), include: x => new { x.PrimaryAddress }) - Note: the row can be accessed via "dynamic", or by casting to an IDictionary<string,object> - + - Read the next grid of results + Delete rows using a SqlFormat filter. E.g: + number of rows deleted - + - Read an individual row of the next grid of results + Delete rows from the runtime table type using a SqlFormat filter. E.g: + + db.DeleteFmt(typeof(Person), "Age = {0}", 27) + number of rows deleted + + + + Delete rows using a SqlFormat filter. E.g: + db.Delete<Person>("Age > {0}", 42) + number of rows deleted - + - Read an individual row of the next grid of results + Delete rows from the runtime table type using a SqlFormat filter. E.g: + db.DeleteFmt(typeof(Person), "Age = {0}", 27) + number of rows deleted - + - Read an individual row of the next grid of results + Insert only fields in POCO specified by the SqlExpression lambda. E.g: + db.InsertOnly(new Person { FirstName = "Amy", Age = 27 }, q => q.Insert(p => new { p.FirstName, p.Age })) - + - Read an individual row of the next grid of results + Using an SqlExpression to only Insert the fields specified, e.g: + + db.InsertOnly(new Person { FirstName = "Amy" }, q => q.Insert(p => new { p.FirstName })); + INSERT INTO "Person" ("FirstName") VALUES ('Amy'); - + - Read the next grid of results + Use an SqlExpression to select which fields to update and construct the where expression, E.g: + + db.UpdateOnly(new Person { FirstName = "JJ" }, ev => ev.Update(p => p.FirstName).Where(x => x.FirstName == "Jimi")); + UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("FirstName" = 'Jimi') + + What's not in the update expression doesn't get updated. No where expression updates all rows. E.g: + + db.UpdateOnly(new Person { FirstName = "JJ", LastName = "Hendo" }, ev => ev.Update(p => p.FirstName)); + UPDATE "Person" SET "FirstName" = 'JJ' - + - Read an individual row of the next grid of results + Flexible Update method to succinctly execute a free-text update statement using optional params. E.g: + + db.Update<Person>(set:"FirstName = {0}".Params("JJ"), where:"LastName = {0}".Params("Hendrix")); + UPDATE "Person" SET FirstName = 'JJ' WHERE LastName = 'Hendrix' - + - Read an individual row of the next grid of results + Flexible Update method to succinctly execute a free-text update statement using optional params. E.g. + + db.Update(table:"Person", set: "FirstName = {0}".Params("JJ"), where: "LastName = {0}".Params("Hendrix")); + UPDATE "Person" SET FirstName = 'JJ' WHERE LastName = 'Hendrix' - + - Read an individual row of the next grid of results + Flexible Delete method to succinctly execute a delete statement using free-text where expression. E.g. + + db.Delete<Person>(where:"Age = {0}".Params(27)); + DELETE FROM "Person" WHERE Age = 27 - + - Read an individual row of the next grid of results + Flexible Delete method to succinctly execute a delete statement using free-text where expression. E.g. + + db.Delete(table:"Person", where: "Age = {0}".Params(27)); + DELETE FROM "Person" WHERE Age = 27 - + - Read multiple objects from a single record set on the grid + Delete the rows that matches the where expression, e.g: + + db.Delete<Person>(ev => ev.Where(p => p.Age == 27)); + DELETE FROM "Person" WHERE ("Age" = 27) - + - Read multiple objects from a single record set on the grid + Insert only fields in POCO specified by the SqlExpression lambda. E.g: + db.InsertOnly(new Person { FirstName = "Amy", Age = 27 }, q => q.Insert(p => new { p.FirstName, p.Age })) - + - Read multiple objects from a single record set on the grid + Use an SqlExpression to select which fields to update and construct the where expression, E.g: + + db.UpdateOnly(new Person { FirstName = "JJ" }, ev => ev.Update(p => p.FirstName).Where(x => x.FirstName == "Jimi")); + UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("FirstName" = 'Jimi') + + What's not in the update expression doesn't get updated. No where expression updates all rows. E.g: + + db.UpdateOnly(new Person { FirstName = "JJ", LastName = "Hendo" }, ev => ev.Update(p => p.FirstName)); + UPDATE "Person" SET "FirstName" = 'JJ' - + - Read multiple objects from a single record set on the grid + Flexible Update method to succinctly execute a free-text update statement using optional params. E.g: + + db.Update<Person>(set:"FirstName = {0}".Params("JJ"), where:"LastName = {0}".Params("Hendrix")); + UPDATE "Person" SET FirstName = 'JJ' WHERE LastName = 'Hendrix' - + - Read multiple objects from a single record set on the grid + Flexible Update method to succinctly execute a free-text update statement using optional params. E.g. + + db.Update(table:"Person", set: "FirstName = {0}".Params("JJ"), where: "LastName = {0}".Params("Hendrix")); + UPDATE "Person" SET FirstName = 'JJ' WHERE LastName = 'Hendrix' - + - Read multiple objects from a single record set on the grid + Flexible Delete method to succinctly execute a delete statement using free-text where expression. E.g. + + db.Delete<Person>(where:"Age = {0}".Params(27)); + DELETE FROM "Person" WHERE Age = 27 - + - Read multiple objects from a single record set on the grid + Flexible Delete method to succinctly execute a delete statement using free-text where expression. E.g. + + db.Delete(table:"Person", where: "Age = {0}".Params(27)); + DELETE FROM "Person" WHERE Age = 27 - + - Has the underlying reader been consumed? + Delete the rows that matches the where expression, e.g: + + db.Delete<Person>(ev => ev.Where(p => p.Age == 27)); + DELETE FROM "Person" WHERE ("Age" = 27) - + - The command associated with the reader + Using an SqlExpression to only Insert the fields specified, e.g: + + db.InsertOnly(new Person { FirstName = "Amy" }, q => q.Insert(p => new { p.FirstName })); + INSERT INTO "Person" ("FirstName") VALUES ('Amy'); - + - Dispose the grid, closing and disposing both the underlying reader and command. + Tell ServiceStack to use ThreadStatic Items Collection for Context Scoped items. + Warning: ThreadStatic Items aren't pinned to the same request in async services which callback on different threads. - + - Implement this interface to pass an arbitrary db specific parameter to Dapper + Gets a list of items for this context. - + - Add the parameter needed to the command before it executes + Returns results from the active connection. - The raw command prior to execution - Parameter name - + - Parses a data reader to a sequence of data of the supplied type. Used for deserializing a reader without a connection, etc. + Returns results from using sql. E.g: + db.Select<Person>("Age > 40") + db.Select<Person>("SELECT * FROM Person WHERE Age > 40") - + - Parses a data reader to a sequence of data of the supplied type (as object). Used for deserializing a reader without a connection, etc. + Returns results from using a parameterized query. E.g: + db.Select<Person>("Age > @age", new { age = 40}) + db.Select<Person>("SELECT * FROM Person WHERE Age > @age", new[] { db.CreateParam("age",40) }) - + - Parses a data reader to a sequence of dynamic. Used for deserializing a reader without a connection, etc. + Returns results from using a parameterized query. E.g: + db.Select<Person>("Age > @age", new { age = 40}) + db.Select<Person>("SELECT * FROM Person WHERE Age > @age", new { age = 40}) - + - Gets the row parser for a specific row on a data reader. This allows for type switching every row based on, for example, a TypeId column. - You could return a collection of the base type but have each more specific. + Returns results from using a parameterized query. E.g: + db.Select<Person>("Age > @age", new Dictionary<string, object> { { "age", 40 } }) + db.Select<Person>("SELECT * FROM Person WHERE Age > @age", new Dictionary<string, object> { { "age", 40 } }) - The data reader to get the parser for the current row from - The type to get the parser for - The start column index of the object (default 0) - The length of columns to read (default -1 = all fields following startIndex) - Return null if we can't find the first column? (default false) - A parser for this specific object from this row. - + - Gets the row parser for a specific row on a data reader. This allows for type switching every row based on, for example, a TypeId column. - You could return a collection of the base type but have each more specific. + Returns a partial subset of results from the specified tableType. E.g: + db.Select<EntityWithId>(typeof(Person)) + - The data reader to get the parser for the current row from - The type to get the parser for - The start column index of the object (default 0) - The length of columns to read (default -1 = all fields following startIndex) - Return null if we can't find the first column? (default false) - A parser for this specific object from this row. - - var result = new List<BaseType>(); - using (var reader = connection.ExecuteReader(@" - select 'abc' as Name, 1 as Type, 3.0 as Value - union all - select 'def' as Name, 2 as Type, 4.0 as Value")) - { - if (reader.Read()) - { - var toFoo = reader.GetRowParser<BaseType>(typeof(Foo)); - var toBar = reader.GetRowParser<BaseType>(typeof(Bar)); - var col = reader.GetOrdinal("Type"); - do - { - switch (reader.GetInt32(col)) - { - case 1: - result.Add(toFoo(reader)); - break; - case 2: - result.Add(toBar(reader)); - break; - } - } while (reader.Read()); - } - } - - abstract class BaseType - { - public abstract int Type { get; } - } - class Foo : BaseType - { - public string Name { get; set; } - public override int Type => 1; - } - class Bar : BaseType - { - public float Value { get; set; } - public override int Type => 2; - } - - + - Identity of a cached query in Dapper, used for extensibility + Returns a partial subset of results from the specified tableType. E.g: + db.Select<EntityWithId>(typeof(Person), "Age = @age", new { age = 27 }) + - + - Create an identity for use with DynamicParameters, internal use only + Returns results from using a single name, value filter. E.g: + db.Where<Person>("Age", 27) - - - - - - - - - - + - The sql + Returns results from using an anonymous type filter. E.g: + db.Where<Person>(new { Age = 27 }) - + - The command type + Returns results using the supplied primary key ids. E.g: + db.SelectByIds<Person>(new[] { 1, 2, 3 }) - - - - - - - - - - - - - - - - - - - + + + Query results using the non-default values in the supplied partially populated POCO example. E.g: + db.SelectNonDefaults(new Person { Id = 1 }) + - - - - + + + Query results using the non-default values in the supplied partially populated POCO example. E.g: + db.SelectNonDefaults("Age > @Age", new Person { Age = 42 }) + - - - - - + + + Returns the first result using a parameterized query. E.g: + db.Single<Person>(new { Age = 42 }) + - + - Compare 2 Identity objects + Returns results from using a single name, value filter. E.g: + db.Single<Person>("Age = @age", new[] { db.CreateParam("age",42) }) - - - + - Implement this interface to pass an arbitrary db specific set of parameters to Dapper + Returns results from using a single name, value filter. E.g: + db.Single<Person>("Age = @age", new { age = 42 }) - + - Add all the parameters needed to the command just before it executes + Returns the first result using a primary key id. E.g: + db.SingleById<Person>(1) - The raw command prior to execution - Information about the query - + - Implements this interface to provide custom member mapping + Returns the first result using a name, value filter. E.g: + db.SingleWhere<Person>("Age", 42) - + - Source DataReader column name + Returns a single scalar value using an SqlExpression. E.g: + db.Column<int>(db.From<Persion>().Select(x => Sql.Count("*")).Where(q => q.Age > 40)) - + - Target member type + Returns a single scalar value using a parameterized query. E.g: + db.Scalar<int>("SELECT COUNT(*) FROM Person WHERE Age > @age", new[] { db.CreateParam("age",40) }) - + - Target property + Returns a single scalar value using a parameterized query. E.g: + db.Scalar<int>("SELECT COUNT(*) FROM Person WHERE Age > @age", new { age = 40 }) - + - Target field + Returns the distinct first column values in a HashSet using an SqlExpression. E.g: + db.Column<int>(db.From<Persion>().Select(x => x.LastName).Where(q => q.Age == 27)) - + - Target constructor parameter + Returns the first column in a List using a SqlFormat query. E.g: + db.Column<string>("SELECT LastName FROM Person WHERE Age = @age", new[] { db.CreateParam("age",27) }) - + - Extends IDynamicParameters with facilities for executing callbacks after commands have completed + Returns the first column in a List using a SqlFormat query. E.g: + db.Column<string>("SELECT LastName FROM Person WHERE Age = @age", new { age = 27 }) - + + - Invoked when the command has executed + Returns the distinct first column values in a HashSet using an SqlFormat query. E.g: + db.ColumnDistinct<int>("SELECT Age FROM Person WHERE Age < @age", new[] { db.CreateParam("age",50) }) - + - Extends IDynamicParameters providing by-name lookup of parameter values + Returns the distinct first column values in a HashSet using an SqlFormat query. E.g: + db.ColumnDistinct<int>("SELECT Age FROM Person WHERE Age < @age", new { age = 50 }) - + + - Get the value of the specified parameter (return null if not found) + Returns an Dictionary<K, List<V>> grouping made from the first two columns using an parameterized query. E.g: + db.Lookup<int, string>("SELECT Age, LastName FROM Person WHERE Age < @age", new[] { db.CreateParam("age",50) }) - + - Implement this interface to perform custom type-based parameter handling and value parsing + Returns an Dictionary<K, List<V>> grouping made from the first two columns using an parameterized query. E.g: + db.Lookup<int, string>("SELECT Age, LastName FROM Person WHERE Age < @age", new { age = 50 }) - + + - Assign the value of a parameter before a command executes + Returns a Dictionary from the first 2 columns: Column 1 (Keys), Column 2 (Values) using sql. E.g: + db.Dictionary<int, string>("SELECT Id, LastName FROM Person WHERE Age < @age", new[] { db.CreateParam("age",50) }) - The parameter to configure - Parameter value - + - Parse a database value back to a typed value + Returns a Dictionary from the first 2 columns: Column 1 (Keys), Column 2 (Values) using sql. E.g: + db.Dictionary<int, string>("SELECT Id, LastName FROM Person WHERE Age < @age", new { age = 50 }) - The value from the database - The type to parse to - The typed value - + - Implement this interface to change default mapping of reader columns to type members + Returns true if the Query returns any records that match the LINQ expression, E.g: + db.Exists<Person>(x => x.Age < 50) - + - Finds best constructor + Returns true if the Query returns any records that match the supplied SqlExpression, E.g: + db.Exists(db.From<Person>().Where(x => x.Age < 50)) - DataReader column names - DataReader column types - Matching constructor or default one - + - Returns a constructor which should *always* be used. - - Parameters will be default values, nulls for reference types and zero'd for value types. - - Use this class to force object creation away from parameterless constructors you don't control. + Returns true if the Query returns any records, using an SqlFormat query. E.g: + db.Exists<Person>(new { Age = 42 }) - + - Gets mapping for constructor parameter + Returns true if the Query returns any records, using a parameterized query. E.g: + db.Exists<Person>("Age = @age", new { age = 42 }) + db.Exists<Person>("SELECT * FROM Person WHERE Age = @age", new { age = 42 }) - Constructor to resolve - DataReader column name - Mapping implementation - + - Gets member mapping for column + Returns results from an arbitrary SqlExpression. E.g: + db.SqlList<Person>(db.From<Person>().Select("*").Where(q => q.Age < 50)) - DataReader column name - Mapping implementation - + - This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example), - and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE** - equality. The type is fully thread-safe. + Returns results from an arbitrary parameterized raw sql query. E.g: + db.SqlList<Person>("EXEC GetRockstarsAged @age", new { age = 50 }) - + - Represents a placeholder for a value that should be replaced as a literal value in the resulting sql + Returns results from an arbitrary parameterized raw sql query. E.g: + db.SqlList<Person>("EXEC GetRockstarsAged @age", new { age = 50 }) - + - The text in the original command that should be replaced + Returns results from an arbitrary parameterized raw sql query. E.g: + db.SqlList<Person>("EXEC GetRockstarsAged @age", new Dictionary<string, object> { { "age", 42 } }) - + - The name of the member referred to by the token + Returns results from an arbitrary parameterized raw sql query with a dbCmd filter. E.g: + db.SqlList<Person>("EXEC GetRockstarsAged @age", dbCmd => ...) - + + - Permits specifying certain SqlMapper values globally. + Returns the first column in a List using a parameterized query. E.g: + db.SqlColumn<string>("SELECT LastName FROM Person WHERE Age < @age", new[] { db.CreateParam("age",50) }) - + - Resets all Settings to their default values + Returns the first column in a List using a parameterized query. E.g: + db.SqlColumn<string>("SELECT LastName FROM Person WHERE Age < @age", new { age = 50 }) - + - Specifies the default Command Timeout for all Queries + Returns the first column in a List using a parameterized query. E.g: + db.SqlColumn<string>("SELECT LastName FROM Person WHERE Age < @age", new Dictionary<string, object> { { "age", 50 } }) - + - Indicates whether nulls in data are silently ignored (default) vs actively applied and assigned to members + Returns a single Scalar value using an SqlExpression. E.g: + db.SqlScalar<int>(db.From<Person>().Select(Sql.Count("*")).Where(q => q.Age < 50)) - + - Should list expansions be padded with null-valued parameters, to prevent query-plan saturation? For example, - an 'in @foo' expansion with 7, 8 or 9 values will be sent as a list of 10 values, with 3, 2 or 1 of them null. - The padding size is relative to the size of the list; "next 10" under 150, "next 50" under 500, - "next 100" under 1500, etc. + Returns a single Scalar value using a parameterized query. E.g: + db.SqlScalar<int>("SELECT COUNT(*) FROM Person WHERE Age < @age", new[] { db.CreateParam("age",50) }) - - Caution: this should be treated with care if your DB provider (or the specific configuration) allows for null - equality (aka "ansi nulls off"), as this may change the intent of your query; as such, this is disabled by - default and must be enabled. - - + - Base-class for simple type-handlers + Returns a single Scalar value using a parameterized query. E.g: + db.SqlScalar<int>("SELECT COUNT(*) FROM Person WHERE Age < @age", new { age = 50 }) - + - Assign the value of a parameter before a command executes + Returns a single Scalar value using a parameterized query. E.g: + db.SqlScalar<int>("SELECT COUNT(*) FROM Person WHERE Age < @age", new Dictionary<string, object> { { "age", 50 } }) - The parameter to configure - Parameter value - + - Parse a database value back to a typed value + Executes a raw sql non-query using sql. E.g: + var rowsAffected = db.ExecuteNonQueryAsync("UPDATE Person SET LastName={0} WHERE Id={1}".SqlFormat("WaterHouse", 7)) - The value from the database - The typed value + number of rows affected - + - Base-class for simple type-handlers that are based around strings + Executes a raw sql non-query using a parameterized query. E.g: + var rowsAffected = db.ExecuteNonQueryAsync("UPDATE Person SET LastName=@name WHERE Id=@id", new { name = "WaterHouse", id = 7 }) + number of rows affected - + - Parse a string into the expected type (the string will never be null) + Executes a raw sql non-query using a parameterized query. + number of rows affected - + - Format an instace into a string (the instance will never be null) + Returns results from a Stored Procedure, using a parameterized query. - + - Assign the value of a parameter before a command executes + Returns the scalar result as a long. - The parameter to configure - Parameter value - + - Parse a database value back to a typed value + Returns the first result with all its references loaded, using a primary key id. E.g: + db.LoadSingleById<Person>(1) - The value from the database - The typed value - + - Not intended for direct usage + Returns the first result with all its references loaded, using a primary key id. E.g: + db.LoadSingleById<Person>(1, include = x => new { x.Address }) - + - Not intended for direct usage + Loads all the related references onto the instance. E.g: + db.LoadReferencesAsync(customer) - + - Not intended for direct usage + Execute any arbitrary raw SQL. + number of rows affected - + - A type handler for data-types that are supported by the underlying provider, but which need - a well-known UdtTypeName to be specified + Execute any arbitrary raw SQL with db params. + number of rows affected - + - Creates a new instance of UdtTypeHandler with the specified UdtTypeName + Insert 1 POCO, use selectIdentity to retrieve the last insert AutoIncrement id (if any). E.g: + var id = db.Insert(new Person { Id = 1, FirstName = "Jimi }, selectIdentity:true) - + - Used to pass a DataTable as a TableValuedParameter + Insert 1 or more POCOs in a transaction. E.g: + db.Insert(new Person { Id = 1, FirstName = "Tupac", LastName = "Shakur", Age = 25 }, + new Person { Id = 2, FirstName = "Biggie", LastName = "Smalls", Age = 24 }) - + - Create a new instance of TableValuedParameter + Insert a collection of POCOs in a transaction. E.g: + db.InsertAll(new[] { new Person { Id = 9, FirstName = "Biggie", LastName = "Smalls", Age = 24 } }) - + - Create a new instance of TableValuedParameter + Updates 1 POCO. All fields are updated except for the PrimaryKey which is used as the identity selector. E.g: + db.Update(new Person { Id = 1, FirstName = "Jimi", LastName = "Hendrix", Age = 27 }) - + - Describes a reader that controls the lifetime of both a command and a reader, - exposing the downstream command/reader as properties. + Updates 1 or more POCOs in a transaction. E.g: + db.Update(new Person { Id = 1, FirstName = "Tupac", LastName = "Shakur", Age = 25 }, + new Person { Id = 2, FirstName = "Biggie", LastName = "Smalls", Age = 24 }) - + - Obtain the underlying reader + Updates 1 or more POCOs in a transaction. E.g: + db.UpdateAll(new[] { new Person { Id = 1, FirstName = "Jimi", LastName = "Hendrix", Age = 27 } }) - + - Obtain the underlying command + Delete rows using an anonymous type filter. E.g: + db.Delete<Person>(new { FirstName = "Jimi", Age = 27 }) + + number of rows deleted + + + + Delete 1 row using all fields in the filter. E.g: + db.Delete(new Person { Id = 1, FirstName = "Jimi", LastName = "Hendrix", Age = 27 }) + number of rows deleted - + - RDBMS Dialect this Converter is for. Injected at registration. + Delete 1 or more rows in a transaction using all fields in the filter. E.g: + db.Delete(new Person { Id = 1, FirstName = "Jimi", LastName = "Hendrix", Age = 27 }) - + - SQL Column Definiton used in CREATE Table. + Delete 1 or more rows using only field with non-default values in the filter. E.g: + db.DeleteNonDefaults(new Person { FirstName = "Jimi", Age = 27 }) + number of rows deleted - + - Used in DB Params. Defaults to DbType.String + Delete 1 or more rows in a transaction using only field with non-default values in the filter. E.g: + db.DeleteNonDefaults(new Person { FirstName = "Jimi", Age = 27 }, + new Person { FirstName = "Janis", Age = 27 }) + number of rows deleted - + - Quoted Value in SQL Statement + Delete 1 row by the PrimaryKey. E.g: + db.DeleteById<Person>(1) + number of rows deleted - + - Customize how DB Param is initialized. Useful for supporting RDBMS-specific Types. + Delete 1 row by the PrimaryKey where the rowVersion matches the optimistic concurrency field. + Will throw RowModefiedExeption if the + row does not exist or has a different row version. + E.g: db.DeleteById<Person>(1) - + - Parameterized value in parameterized queries + Delete all rows identified by the PrimaryKeys. E.g: + db.DeleteById<Person>(new[] { 1, 2, 3 }) + number of rows deleted - + - Value from DB to Populate on POCO Data Model with + Delete all rows in the generic table type. E.g: + db.DeleteAll<Person>() + number of rows deleted - + - Retrieve Value from ADO.NET IDataReader. Defaults to reader.GetValue() + Delete all rows in the runtime table type. E.g: + db.DeleteAll(typeof(Person)) + number of rows deleted - + - For Types that are natively supported by RDBMS's and shouldn't be quoted + Insert a new row or update existing row. Returns true if a new row was inserted. + Optional references param decides whether to save all related references as well. E.g: + db.SaveAsync(customer, references:true) + true if a row was inserted; false if it was updated - + - Returns results from using an SqlFormat query. E.g: - db.SelectFmt<Person>("Age > {0}", 40) - db.SelectFmt<Person>("SELECT * FROM Person WHERE Age > {0}", 40) + Insert new rows or update existing rows. Return number of rows added E.g: + db.SaveAsync(new Person { Id = 10, FirstName = "Amy", LastName = "Winehouse", Age = 27 }) + number of rows added - + - Returns a partial subset of results from the specified tableType using a SqlFormat query. E.g: - db.SelectFmt<EntityWithId>(typeof(Person), "Age > {0}", 40) + Insert new rows or update existing rows. Return number of rows added E.g: + db.SaveAllAsync(new [] { new Person { Id = 10, FirstName = "Amy", LastName = "Winehouse", Age = 27 } }) + number of rows added - + - Returns a lazyily loaded stream of results using an SqlFilter query. E.g: - db.SelectLazyFmt<Person>("Age > {0}", 40) + Populates all related references on the instance with its primary key and saves them. Uses '(T)Id' naming convention. E.g: + db.SaveAllReferences(customer) - + - Returns the first result using a SqlFormat query. E.g: - db.SingleFmt<Person>("Age = {0}", 42) + Populates the related references with the instance primary key and saves them. Uses '(T)Id' naming convention. E.g: + db.SaveReference(customer, customer.Orders) - + - Returns a single scalar value using an SqlFormat query. E.g: - db.ScalarFmt<int>("SELECT COUNT(*) FROM Person WHERE Age > {0}", 40) + Populates the related references with the instance primary key and saves them. Uses '(T)Id' naming convention. E.g: + db.SaveReference(customer, customer.Orders) - + - Returns the first column in a List using a SqlFormat query. E.g: - db.ColumnFmt<string>("SELECT LastName FROM Person WHERE Age = {0}", 27) + Populates the related references with the instance primary key and saves them. Uses '(T)Id' naming convention. E.g: + db.SaveReferences(customer, customer.Orders) - + - Returns the distinct first column values in a HashSet using an SqlFormat query. E.g: - db.ColumnDistinctFmt<int>("SELECT Age FROM Person WHERE Age < {0}", 50) + Returns results from using a LINQ Expression. E.g: + db.Select<Person>(x => x.Age > 40) - + - Returns an Dictionary<K, List<V>> grouping made from the first two columns using an SqlFormat query. E.g: - db.LookupFmt<int, string>("SELECT Age, LastName FROM Person WHERE Age < {0}", 50) + Returns results from using an SqlExpression lambda. E.g: + db.Select(db.From<Person>().Where(x => x.Age > 40)) - + - Returns a Dictionary from the first 2 columns: Column 1 (Keys), Column 2 (Values) using an SqlFormat query. E.g: - db.DictionaryFmt<int, string>("SELECT Id, LastName FROM Person WHERE Age < {0}", 50) + Project results from a number of joined tables into a different model - + - Returns true if the Query returns any records, using an SqlFormat query. E.g: - db.ExistsFmt<Person>("Age = {0}", 42) - db.ExistsFmt<Person>("SELECT * FROM Person WHERE Age = {0}", 50) + Returns results from using an SqlExpression lambda. E.g: + db.SelectAsync(db.From<Person>().Where(x => x.Age > 40)) - + - Returns true if the Query returns any records that match the SqlExpression lambda, E.g: - db.Exists<Person>(q => q.Where(x => x.Age < 50)) + Returns a single result from using a LINQ Expression. E.g: + db.Single<Person>(x => x.Age == 42) - + - Create a new SqlExpression builder allowing typed LINQ-like queries. + Returns results from using an SqlExpression lambda. E.g: + db.SingleAsync<Person>(x => x.Age > 40) - + Returns results from using an SqlExpression lambda. E.g: - db.Select<Person>(q => q.Where(x => x.Age > 40)) + db.SingleAsync(db.From<Person>().Where(x => x.Age > 40)) - + - Project results from a number of joined tables into a different model + Returns a scalar result from using an SqlExpression lambda. E.g: + db.Scalar<Person, int>(x => Sql.Max(x.Age)) - + - Project results from a number of joined tables into a different model - + Returns a scalar result from using an SqlExpression lambda. E.g: + db.Scalar<Person, int>(x => Sql.Max(x.Age), , x => x.Age < 50) + - + - Returns a single result from using an SqlExpression lambda. E.g: - db.Single<Person>(q => q.Where(x => x.Age == 42)) + Returns the count of rows that match the LINQ expression, E.g: + db.Count<Person>(x => x.Age < 50) - + - Returns the count of rows that match the SqlExpression lambda, E.g: - db.Count<Person>(q => q.Where(x => x.Age < 50)) + Returns the count of rows that match the supplied SqlExpression, E.g: + db.Count(db.From<Person>().Where(x => x.Age < 50)) - + - Returns results with references from using an SqlExpression lambda. E.g: - db.LoadSelect<Person>(q => q.Where(x => x.Age > 40)) + Return the number of rows returned by the supplied expression - + - Returns results with references from using an SqlExpression lambda. E.g: - db.LoadSelect<Person>(q => q.Where(x => x.Age > 40), include: x => new { x.PrimaryAddress }) + Return the number of rows returned by the supplied sql - + - Delete rows using a SqlFormat filter. E.g: - db.Delete<Person>("Age > {0}", 42) + Returns results with references from using a LINQ Expression. E.g: + db.LoadSelectAsync<Person>(x => x.Age > 40) - number of rows deleted - + - Delete rows from the runtime table type using a SqlFormat filter. E.g: + Returns results with references from using an SqlExpression lambda. E.g: + db.LoadSelectAsync(db.From<Person>().Where(x => x.Age > 40)) - db.DeleteFmt(typeof(Person), "Age = {0}", 27) - number of rows deleted - + - Insert only fields in POCO specified by the SqlExpression lambda. E.g: - db.InsertOnly(new Person { FirstName = "Amy", Age = 27 }, q => q.Insert(p => new { p.FirstName, p.Age })) + Project results with references from a number of joined tables into a different model - + Use an SqlExpression to select which fields to update and construct the where expression, E.g: - db.UpdateOnly(new Person { FirstName = "JJ" }, ev => ev.Update(p => p.FirstName).Where(x => x.FirstName == "Jimi")); + var q = db.From>Person<()); + db.UpdateOnly(new Person { FirstName = "JJ" }, q.Update(p => p.FirstName).Where(x => x.FirstName == "Jimi")); UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("FirstName" = 'Jimi') What's not in the update expression doesn't get updated. No where expression updates all rows. E.g: - db.UpdateOnly(new Person { FirstName = "JJ", LastName = "Hendo" }, ev => ev.Update(p => p.FirstName)); + db.UpdateOnly(new Person { FirstName = "JJ", LastName = "Hendo" }, ev.Update(p => p.FirstName)); UPDATE "Person" SET "FirstName" = 'JJ' - + + + Update record, updating only fields specified in updateOnly that matches the where condition (if any), E.g: + + db.UpdateOnlyAsync(() => new Person { FirstName = "JJ" }, where: p => p.LastName == "Hendrix"); + UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("LastName" = 'Hendrix') + + db.UpdateOnlyAsync(() => new Person { FirstName = "JJ" }); + UPDATE "Person" SET "FirstName" = 'JJ' + + + - Flexible Update method to succinctly execute a free-text update statement using optional params. E.g: + Update record, updating only fields specified in updateOnly that matches the where condition (if any), E.g: - db.Update<Person>(set:"FirstName = {0}".Params("JJ"), where:"LastName = {0}".Params("Hendrix")); - UPDATE "Person" SET FirstName = 'JJ' WHERE LastName = 'Hendrix' + db.UpdateOnlyAsync(() => new Person { FirstName = "JJ" }, db.From<Person>().Where(p => p.LastName == "Hendrix")); + UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("LastName" = 'Hendrix') - + + + Update record, updating only fields specified in updateOnly that matches the where condition (if any), E.g: + + db.UpdateOnly(new Person { FirstName = "JJ" }, p => p.FirstName, p => p.LastName == "Hendrix"); + UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("LastName" = 'Hendrix') + + db.UpdateOnly(new Person { FirstName = "JJ" }, p => p.FirstName); + UPDATE "Person" SET "FirstName" = 'JJ' + + + + + Update record, updating only fields specified in updateOnly that matches the where condition (if any), E.g: + Numeric fields generates an increment sql which is usefull to increment counters, etc... + avoiding concurrency conflicts + + db.UpdateAddAsync(() => new Person { Age = 5 }, where: p => p.LastName == "Hendrix"); + UPDATE "Person" SET "Age" = "Age" + 5 WHERE ("LastName" = 'Hendrix') + + db.UpdateAddAsync(() => new Person { Age = 5 }); + UPDATE "Person" SET "Age" = "Age" + 5 + + + - Flexible Update method to succinctly execute a free-text update statement using optional params. E.g. + Update record, updating only fields specified in updateOnly that matches the where condition (if any), E.g: - db.Update(table:"Person", set: "FirstName = {0}".Params("JJ"), where: "LastName = {0}".Params("Hendrix")); - UPDATE "Person" SET FirstName = 'JJ' WHERE LastName = 'Hendrix' + db.UpdateOnly(new Person { FirstName = "JJ" }, new[]{ "FirstName" }, p => p.LastName == "Hendrix"); + UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("LastName" = 'Hendrix') - + - Flexible Delete method to succinctly execute a delete statement using free-text where expression. E.g. + Update record, updating only fields specified in updateOnly that matches the where condition (if any), E.g: + Numeric fields generates an increment sql which is usefull to increment counters, etc... + avoiding concurrency conflicts - db.Delete<Person>(where:"Age = {0}".Params(27)); - DELETE FROM "Person" WHERE Age = 27 + db.UpdateAddAsync(() => new Person { Age = 5 }, db.From<Person>().Where(p => p.LastName == "Hendrix")); + UPDATE "Person" SET "Age" = "Age" + 5 WHERE ("LastName" = 'Hendrix') - + - Flexible Delete method to succinctly execute a delete statement using free-text where expression. E.g. + Updates all non-default values set on item matching the where condition (if any). E.g - db.Delete(table:"Person", where: "Age = {0}".Params(27)); - DELETE FROM "Person" WHERE Age = 27 + db.UpdateNonDefaults(new Person { FirstName = "JJ" }, p => p.FirstName == "Jimi"); + UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("FirstName" = 'Jimi') - + - Delete the rows that matches the where expression, e.g: + Updates all values set on item matching the where condition (if any). E.g - db.Delete<Person>(ev => ev.Where(p => p.Age == 27)); - DELETE FROM "Person" WHERE ("Age" = 27) + db.Update(new Person { Id = 1, FirstName = "JJ" }, p => p.LastName == "Hendrix"); + UPDATE "Person" SET "Id" = 1,"FirstName" = 'JJ',"LastName" = NULL,"Age" = 0 WHERE ("LastName" = 'Hendrix') - + + + Updates all matching fields populated on anonymousType that matches where condition (if any). E.g: + + db.Update<Person>(new { FirstName = "JJ" }, p => p.LastName == "Hendrix"); + UPDATE "Person" SET "FirstName" = 'JJ' WHERE ("LastName" = 'Hendrix') + + + Using an SqlExpression to only Insert the fields specified, e.g: - db.InsertOnly(new Person { FirstName = "Amy" }, q => q.Insert(p => new { p.FirstName })); + db.InsertOnlyAsync(new Person { FirstName = "Amy" }, p => p.FirstName)); INSERT INTO "Person" ("FirstName") VALUES ('Amy'); + + db.InsertOnlyAsync(new Person { Id =1 , FirstName="Amy" }, p => new { p.Id, p.FirstName })); + INSERT INTO "Person" ("Id", "FirstName") VALUES (1, 'Amy'); - + - Tell ServiceStack to use ThreadStatic Items Collection for Context Scoped items. - Warning: ThreadStatic Items aren't pinned to the same request in async services which callback on different threads. + Using an SqlExpression to only Insert the fields specified, e.g: + + db.InsertOnly(new Person { FirstName = "Amy" }, new[]{ "FirstName" })); + INSERT INTO "Person" ("FirstName") VALUES ('Amy'); - + - Gets a list of items for this context. + Using an SqlExpression to only Insert the fields specified, e.g: + + db.InsertOnlyAsync(() => new Person { FirstName = "Amy" })); + INSERT INTO "Person" ("FirstName") VALUES (@FirstName); + + + + + Delete the rows that matches the where expression, e.g: + + db.Delete<Person>(p => p.Age == 27); + DELETE FROM "Person" WHERE ("Age" = 27) + + + + + Delete the rows that matches the where expression, e.g: + + var q = db.From>Person<()); + db.Delete<Person>(q.Where(p => p.Age == 27)); + DELETE FROM "Person" WHERE ("Age" = 27) diff --git a/lib/ServiceStack.Razor.dll b/lib/ServiceStack.Razor.dll index 3ef7b3f8..aee04b43 100644 Binary files a/lib/ServiceStack.Razor.dll and b/lib/ServiceStack.Razor.dll differ diff --git a/lib/ServiceStack.Redis.dll b/lib/ServiceStack.Redis.dll index 0e1d9820..f1fd0793 100644 Binary files a/lib/ServiceStack.Redis.dll and b/lib/ServiceStack.Redis.dll differ diff --git a/lib/ServiceStack.Server.dll b/lib/ServiceStack.Server.dll index dee7a3f6..64b6ac05 100644 Binary files a/lib/ServiceStack.Server.dll and b/lib/ServiceStack.Server.dll differ diff --git a/lib/ServiceStack.Text.dll b/lib/ServiceStack.Text.dll index 1d408328..c38d2879 100644 Binary files a/lib/ServiceStack.Text.dll and b/lib/ServiceStack.Text.dll differ diff --git a/lib/ServiceStack.dll b/lib/ServiceStack.dll index 7b344a2f..28cfa043 100644 Binary files a/lib/ServiceStack.dll and b/lib/ServiceStack.dll differ diff --git a/lib/ServiceStack.xml b/lib/ServiceStack.xml index 70b6b83b..a449de12 100644 --- a/lib/ServiceStack.xml +++ b/lib/ServiceStack.xml @@ -79,6 +79,11 @@ Used to Issue and process JWT Tokens and registers ConvertSessionToToken Service to convert Sessions to JWT Tokens + + + Whether to populate the Bearer Token in the AuthenticateResponse + + Enable access to protected Services using JWT Tokens diff --git a/lib/signed/ServiceStack.Client.dll b/lib/signed/ServiceStack.Client.dll index 4c823a34..56d9f1b1 100644 Binary files a/lib/signed/ServiceStack.Client.dll and b/lib/signed/ServiceStack.Client.dll differ diff --git a/lib/signed/ServiceStack.Common.dll b/lib/signed/ServiceStack.Common.dll index edff33e0..17c9a194 100644 Binary files a/lib/signed/ServiceStack.Common.dll and b/lib/signed/ServiceStack.Common.dll differ diff --git a/lib/signed/ServiceStack.OrmLite.SqlServer.dll b/lib/signed/ServiceStack.OrmLite.SqlServer.dll index 656a78db..2eb3cb72 100644 Binary files a/lib/signed/ServiceStack.OrmLite.SqlServer.dll and b/lib/signed/ServiceStack.OrmLite.SqlServer.dll differ diff --git a/lib/signed/ServiceStack.OrmLite.dll b/lib/signed/ServiceStack.OrmLite.dll index c54d50a6..9bf92a64 100644 Binary files a/lib/signed/ServiceStack.OrmLite.dll and b/lib/signed/ServiceStack.OrmLite.dll differ diff --git a/lib/signed/ServiceStack.Redis.XML b/lib/signed/ServiceStack.Redis.XML index 4b588842..467f087c 100644 --- a/lib/signed/ServiceStack.Redis.XML +++ b/lib/signed/ServiceStack.Redis.XML @@ -255,7 +255,7 @@ - The default RetryTimeout for auto retry of failed operations (default 3000ms) + The default RetryTimeout for auto retry of failed operations (default 10,000ms) diff --git a/lib/signed/ServiceStack.Redis.dll b/lib/signed/ServiceStack.Redis.dll index ac8866b1..1ba1549d 100644 Binary files a/lib/signed/ServiceStack.Redis.dll and b/lib/signed/ServiceStack.Redis.dll differ diff --git a/lib/signed/ServiceStack.Text.dll b/lib/signed/ServiceStack.Text.dll index b79c4609..c2bc291e 100644 Binary files a/lib/signed/ServiceStack.Text.dll and b/lib/signed/ServiceStack.Text.dll differ diff --git a/lib/signed/ServiceStack.dll b/lib/signed/ServiceStack.dll index 4d65cba0..e968ffc4 100644 Binary files a/lib/signed/ServiceStack.dll and b/lib/signed/ServiceStack.dll differ diff --git a/src/ServiceStack.Aws.sln b/src/ServiceStack.Aws.sln index 77042eef..c3085e29 100644 --- a/src/ServiceStack.Aws.sln +++ b/src/ServiceStack.Aws.sln @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{91F39E88 ..\build\build.proj = ..\build\build.proj ..\lib\copy.bat = ..\lib\copy.bat ..\NuGet\ServiceStack.Aws\servicestack.aws.nuspec = ..\NuGet\ServiceStack.Aws\servicestack.aws.nuspec + ..\NuGet.Signed\ServiceStack.Aws.Signed\servicestack.aws.signed.nuspec = ..\NuGet.Signed\ServiceStack.Aws.Signed\servicestack.aws.signed.nuspec ..\build\start-local-dynamodb.bat = ..\build\start-local-dynamodb.bat EndProjectSection EndProject @@ -30,11 +31,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Demos", "Demos", "{13DBB9CD EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Host.Console", "..\tests\Host.Console\Host.Console.csproj", "{BDF3DBA4-29B9-47D9-B25C-DDC0077FC7CD}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{16A94121-C188-4E94-8F07-A7756A78D3C8}" - ProjectSection(SolutionItems) = preProject - ..\NuGet.Signed\ServiceStack.Aws.Signed\servicestack.aws.signed.nuspec = ..\NuGet.Signed\ServiceStack.Aws.Signed\servicestack.aws.signed.nuspec - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/src/ServiceStack.Aws/ServiceStack.Aws.csproj b/src/ServiceStack.Aws/ServiceStack.Aws.csproj index ecf419f5..b0ab71b9 100644 --- a/src/ServiceStack.Aws/ServiceStack.Aws.csproj +++ b/src/ServiceStack.Aws/ServiceStack.Aws.csproj @@ -45,19 +45,19 @@ - ..\packages\AWSSDK.Core.3.1.9.1\lib\net45\AWSSDK.Core.dll + ..\packages\AWSSDK.Core.3.1.10.0\lib\net45\AWSSDK.Core.dll True - ..\packages\AWSSDK.DynamoDBv2.3.1.5.2\lib\net45\AWSSDK.DynamoDBv2.dll + ..\packages\AWSSDK.DynamoDBv2.3.1.5.3\lib\net45\AWSSDK.DynamoDBv2.dll True - ..\packages\AWSSDK.S3.3.1.8.1\lib\net45\AWSSDK.S3.dll + ..\packages\AWSSDK.S3.3.1.9.0\lib\net45\AWSSDK.S3.dll True - ..\packages\AWSSDK.SQS.3.1.0.12\lib\net45\AWSSDK.SQS.dll + ..\packages\AWSSDK.SQS.3.1.0.13\lib\net45\AWSSDK.SQS.dll True @@ -158,9 +158,9 @@ - - - + + + diff --git a/src/ServiceStack.Aws/packages.config b/src/ServiceStack.Aws/packages.config index 432f64e4..40f9a57c 100644 --- a/src/ServiceStack.Aws/packages.config +++ b/src/ServiceStack.Aws/packages.config @@ -1,7 +1,7 @@  - - - - + + + + \ No newline at end of file