sqlc-gen-csharp is a .Net plugin for sqlc.
It leverages the SQLC plugin system to generate type-safe C# code for SQL queries, supporting PostgresSQL, MySQL & SQLite via the corresponding driver or suitable Dapper abstraction.
Quickstart
version: "2" plugins: - name: csharp wasm: url: https://github.com/DaredevilOSS/sqlc-gen-csharp/releases/download/v0.23.0/sqlc-gen-csharp.wasm sha256: 14aaa98ca141bde2160df534f6d19036d474dba5cd168d6096cf881d33153338 sql: # For PostgresSQL - schema: schema.sql queries: queries.sql engine: postgresql codegen: - plugin: csharp out: PostgresDalGen # For MySQL - schema: schema.sql queries: queries.sql engine: mysql codegen: - plugin: csharp out: MySqlDalGen # For SQLite - schema: schema.sql queries: queries.sql engine: sqlite codegen: - plugin: csharp out: SqliteDalGen
Usage
Options
| Option | Possible values | Optional | Info |
|---|---|---|---|
| overrideDriverVersion | default:2.3.6 for MySqlConnector (mysql)8.0.3 for Npgsql (postgresql)8.0.10 for Microsoft.Data.Sqlite (sqlite)values: The desired driver version |
Yes | Allows you to override the version of DB driver to be used. |
| targetFramework | default: net8.0values: netstandard2.0, netstandard2.1, net8.0 |
Yes | Determines the target framework for your generated code, meaning the generated code will be compiled to the specified runtime. For more information and help deciding on the right value, refer to the Microsoft .NET Standard documentation. |
| generateCsproj | default: truevalues: false,true |
Yes | Assists you with the integration of SQLC and csharp by generating a .csproj file. This converts the generated output to a .dll, a project that you can easily incorporate into your build process. |
| namespaceName | default: the generated project name | Yes | Allows you to override the namespace name to be different than the project name |
| useDapper | default: falsevalues: false,true |
Yes | Enables Dapper as a thin wrapper for the generated code. For more information, please refer to the Dapper documentation. |
| overrideDapperVersion | default:2.1.35values: The desired Dapper version |
Yes | If useDapper is set to true, this option allows you to override the version of Dapper to be used. |
| Override | values: A nested override value like this. | Yes | Allows you to override the generated C# data types for specific columns in specific queries. This option accepts a query_name:column_name mapping and the overriden data type. |
| useCentralPackageManagement | default: falsevalues: false,true |
Yes | If true, the code is generated to support central package management. |
| withAsyncSuffix | default: truevalues: false,true |
Yes | When true, async methods will have the "Async" suffix appended to their names (e.g., GetAuthorAsync). When false, async methods will not have the suffix (e.g., GetAuthor). |
| withCancellationToken | default: falsevalues: false,true |
Yes | When true, every generated method takes an optional trailing CancellationToken cancellationToken = default, threaded into every async DB call so in-flight queries can be cancelled. See Cancellation. When false (default), generated output is unchanged. |
Override option
Override for a specific query:
overrides: - column: "<query-name>:<field-name>" csharp_type: type: "<csharp-datatype>" notNull: true|false
Override for all queries:
overrides: - column: "*:<field-name>" csharp_type: type: "<csharp-datatype>" notNull: true|false
Supported Features
- ✅ means the feature is fully supported.
- ⚠️ means SQLC does not yet support this feature, so it cannot be supported by the plugin yet.
- 🚫 means the database does not support the feature.
- ❌ means the feature is not supported by the plugin (but could be supported by the database).
Query Annotations
Basic functionality - same for all databases:
:one- returns 0...1 records:many- returns 0...n records:exec- DML / DDL that does not return anything:execrows- returns number of affected rows by DML
Advanced functionality - varies between databases:
:execlastid- INSERT with returned last inserted id:copyfrom- batch insert, implementation varies greatly
| Annotation | PostgresSQL | MySQL | SQLite |
|---|---|---|---|
| :one | ✅ | ✅ | ✅ |
| :many | ✅ | ✅ | ✅ |
| :exec | ✅ | ✅ | ✅ |
| :execrows | ✅ | ✅ | ✅ |
| :execlastid | ✅ | ✅ | ✅ |
| :copyfrom | ✅ | ✅ | ✅ |
More info can be found in here.
Macro Annotations
sqlc.arg- Attach a name to a parameter in a SQL querysqlc.narg- The same assqlc.arg, but always marks the parameter as nullablesqlc.slice- For databases that do not support passing arrays to theINoperator, generates a dynamic query at runtime with the correct number of parameterssqlc.embed- Embedding allows you to reuse existing model structs in more queries
| Annotation | PostgresSQL | MySQL | SQLite |
|---|---|---|---|
| sqlc.arg | ✅ | ✅ | ✅ |
| sqlc.narg | ✅ | ✅ | ✅ |
| sqlc.slice | 🚫 | ✅ | ✅ |
| sqlc.embed | ✅ | ✅ | ✅ |
More info can be found in here.
Transactions
Transactions are supported by the plugin.
Example using a transaction
public async Task ExampleTransaction(IDbConnection connection) { // Begin a transaction using (var transaction = connection.BeginTransaction()) { try { // Create a new Queries object with the transaction instead of the connection var queries = QuerySql.WithTransaction(transaction); // Example: Insert a new author var newAuthor = await queries.CreateAuthor(new CreateAuthorParams { Name = "Jane Doe", Bio = "Another author" }); // Example: Get the author by ID within the same transaction var author = await queries.GetAuthor(newAuthor.AuthorID); // Example: Update the author's bio await queries.UpdateAuthorBio(new UpdateAuthorBioParams { AuthorID = author.AuthorID, Bio = "Updated bio for Jane Doe" }); // Commit the transaction if all operations are successful transaction.Commit(); Console.WriteLine("Transaction committed successfully."); } catch (Exception ex) { // Rollback the transaction if any error occurs transaction.Rollback(); Console.WriteLine($"Transaction rolled back due to error: {ex.Message}"); throw; } } }
More info can be found in here.
Cancellation
Set withCancellationToken: true to make every generated method accept an optional
CancellationToken. The token is threaded into every async database call, so a cancelled
token interrupts the in-flight query and releases the locks that statement holds. The
option is off by default; when off, generated output is identical to before.
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5)); try { var author = await queries.GetAuthor(authorId, cts.Token); } catch (OperationCanceledException) { // the query was cancelled; its statement-level locks are released }
Notes:
- PostgreSQL & MySQL interrupt the running statement server-side (Npgsql sends a cancel
request; MySqlConnector issues
KILL QUERY), releasing that statement's locks immediately. - SQLite runs synchronously and only honours the token before the statement starts; an already-running SQLite statement is not interrupted.
- Transactions: cancelling a query inside a
WithTransaction(...)flow releases only that statement's locks. Locks held by earlier statements in the transaction (and, on PostgreSQL, the aborted-transaction state) are released when you roll back — the generated code never rolls back for you.
PostgresSQL
:execlastid - ImplementationImplemented via a RETURNING clause, allowing the INSERT command to return the newly created id.
The data types that can be used as id data types for this annotation are:
- uuid
- bigint
- integer
- smallint (less recommended due to small id range, but possible)
INSERT INTO tab1 (field1, field2) VALUES ('a', 1) RETURNING id_field;
Implemented via the COPY FROM command which can load binary data directly from stdin.
Since in batch insert the data is not validated by the SQL itself but written in a binary format, we consider support for the different data types separately for batch inserts and everything else.
| DB Type | Supported? | Supported in Batch? |
|---|---|---|
| boolean | ✅ | ✅ |
| smallint | ✅ | ✅ |
| integer | ✅ | ✅ |
| bigint | ✅ | ✅ |
| real | ✅ | ✅ |
| decimal, numeric | ✅ | ✅ |
| double precision | ✅ | ✅ |
| date | ✅ | ✅ |
| timestamp, timestamp without time zone | ✅ | ✅ |
| timestamp with time zone | ✅ | ✅ |
| time, time without time zone | ✅ | ✅ |
| time with time zone | 🚫 | 🚫 |
| interval | ✅ | ✅ |
| char | ✅ | ✅ |
| bpchar | ✅ | ✅ |
| varchar, character varying | ✅ | ✅ |
| text | ✅ | ✅ |
| bytea | ✅ | ✅ |
| 2-dimensional arrays (e.g text[],int[]) | ✅ | ✅ |
| money | ✅ | ✅ |
| point | ✅ | ✅ |
| line | ✅ | ✅ |
| lseg | ✅ | ✅ |
| box | ✅ | ✅ |
| path | ✅ | ✅ |
| polygon | ✅ | ✅ |
| circle | ✅ | ✅ |
| cidr | ✅ | ✅ |
| inet | ✅ | ✅ |
| macaddr | ✅ | ✅ |
| macaddr8 | ✅ | ⚠️ |
| tsvector | ✅ | ❌ |
| tsquery | ✅ | ❌ |
| uuid | ✅ | ✅ |
| json | ✅ | ✅ |
| jsonb | ✅ | ✅ |
| jsonpath | ✅ | ⚠️ |
| xml | ✅ | ⚠️ |
| enum | ✅ | ⚠️ |
| any | ✅ | ❌ |
| hstore | ✅ | ❌ |
*** time with time zone is not useful and not recommended to use by Postgres themselves -
see here -
so we decided not to implement support for it.
*** Some data types require conversion in the INSERT statement, and SQLC disallows argument conversion in queries with :copyfrom annotation, which are used for batch inserts.
These are the data types that require this conversion:
macaddr8jsonpathxmlenum
An example of this conversion:
INSERT INTO tab1 (macaddr8_field) VALUES (sqlc.narg('macaddr8_field')::macaddr8);
*** any is a pseudo-type reported by sqlc when it cannot infer a column's type; it maps to object in C#.
*** hstore is a key-value store type that maps to object in C#; readers use GetValue() to retrieve the value.
MySQL
:execlastid - ImplementationThe implementation differs if we're using Dapper or not.
Driver - MySqlConnector
The driver provides a LastInsertedId property to get the latest inserted id in the DB.
When accessing the property, it automatically performs the below query:
SELECT LAST_INSERT_ID();That will work only when the id column is defined as serial or bigserial, and the generated method will always return
a long value.
Dapper
Since the LastInsertedId is DB specific and hence not available in Dapper, the LAST_INSERT_ID query is simply
appended to the original query like this:
INSERT INTO tab1 (field1, field2) VALUES ('a', 1); SELECT LAST_INSERT_ID();
The generated method will return int & long for serial & bigserial respectively.
Since in batch insert the data is not validated by the SQL itself but written and read from a CSV, we consider support for the different data types separately for batch inserts and everything else.
| DB Type | Supported? | Supported in Batch? |
|---|---|---|
| bool, boolean, tinyint(1) | ✅ | ✅ |
| bit | ✅ | ✅ |
| tinyint | ✅ | ✅ |
| smallint | ✅ | ✅ |
| mediumint | ✅ | ✅ |
| integer, int | ✅ | ✅ |
| bigint | ✅ | ✅ |
| real | ✅ | ✅ |
| numeric | ✅ | ✅ |
| decimal | ✅ | ✅ |
| double precision | ✅ | ✅ |
| year | ✅ | ✅ |
| date | ✅ | ✅ |
| timestamp | ✅ | ✅ |
| char | ✅ | ✅ |
| nchar, national char | ✅ | ✅ |
| varchar | ✅ | ✅ |
| tinytext | ✅ | ✅ |
| mediumtext | ✅ | ✅ |
| text | ✅ | ✅ |
| longtext | ✅ | ✅ |
| binary | ✅ | ✅ |
| varbinary | ✅ | ✅ |
| tinyblob | ✅ | ✅ |
| blob | ✅ | ✅ |
| mediumblob | ✅ | ✅ |
| longblob | ✅ | ✅ |
| enum | ✅ | ✅ |
| set | ✅ | ✅ |
| json | ✅ | ✅ |
| geometry | ⚠️ | ⚠️ |
| point | ⚠️ | ⚠️ |
| linestring | ⚠️ | ⚠️ |
| polygon | ⚠️ | ⚠️ |
| multipoint | ⚠️ | ⚠️ |
| multilinestring | ⚠️ | ⚠️ |
| multipolygon | ⚠️ | ⚠️ |
| geometrycollection | ⚠️ | ⚠️ |
SQLite3
:execlastid - Implementation:execlastid - Implementation
Implemented via a RETURNING clause, allowing the INSERT command to return the newly created id.
Only integer data type is supported as id for this annotation.
INSERT INTO tab1 (field1, field2) VALUES ('a', 1) RETURNING id_field;
INSERT INTO tab1 (field1, field2) VALUES ('a', 1), ('b', 2), ('c', 3);
| DB Type | Supported? |
|---|---|
| integer | ✅ |
| real | ✅ |
| text | ✅ |
| blob | ✅ |
Useful Overrides
It's possible to use the override data type functionality of the plugin thus overcoming the limited amount of data types that are supported by SQLite. The supported overrides are specified below:
| DB Type | C# Type Override | Supported? | Description |
|---|---|---|---|
| integer | DateTime | ✅ | Unix Epoch - seconds since 1-1-1970 |
| text | DateTime | ✅ | String representation of the datetime in a configurable format |
| integer | bool | ✅ | If x equals 0 -> False, otherwise -> True |
| text | bool | ✅ | Converts string to a boolean value using Convert.ToBoolean rules |
Benchmark Results
Read Benchmarks
L=Query Limit, C=Concurrency, Q=Total Queries To Submit
Write Benchmarks
R=Total Records to Load, B=Batch Size
Contributing
Local plugin development
Prerequisites
Make sure that the following applications are installed and added to your path.
Follow the instructions in each of these:
- Dotnet CLI - Dotnet Installation - use version
.NET 8.0 (latest) - Buf build - Buf Build
- WASM (follow this guide) - WASM libs
Pre-commit Setup
This repository uses pre-commit. To set up pre-commit hooks, run:
pip install pre-commit pre-commit install
Protobuf
SQLC protobuf are defined in sqlc-dev/sqlc repository. Generating C# code from protocol buffer files:
make protobuf-generate
Generating code
SQLC utilizes our process / WASM plugin to generate code:
make sqlc-generate-process
make sqlc-generate-wasm
Testing generated code
Testing the SQLC generated code via a predefined flow:
make test-process-plugin
make test-wasm-plugin
Release flow
The release flow in this repo follows the semver conventions, building tag as v[major].[minor].[patch].
PR Gate
Every PR that modifies source code, build configuration, or similar must be labeled with one of: major, minor, patch, or skip-release.
A bot posts a status check (release-assistant/requirements) that blocks merging until a version label is present.
Generate Release PR
When Build completes on main, the gen-release-pr.yml workflow runs and:
- Aggregates all unreleased, labeled PRs since the last release tag.
- Determines the release type from the labels (
major>minor>patch). - Computes the new version from the latest tag.
- Downloads the latest wasm artifact and computes its sha256.
- Regenerates documentation (README, quickstart) with the new version and wasm sha.
- Opens a
release-prepPR with the regenerated docs.
Release
When the release-prep PR is merged, release.yml:
- Detects the
chore: prepare release vXcommit. - Downloads the wasm artifact from the triggering Build.
- Reconstructs release notes from merged PR titles since the previous tag.
- Creates the release (with tag) and uploads the wasm asset.
Examples
QuickStartPostgresDalGenEngine postgresql: QuickStartPostgresDalGen
Schema | Queries | End2End Test
Config
QuickStartMySqlDalGenEngine mysql: QuickStartMySqlDalGen
Schema | Queries | End2End Test
Config
QuickStartSqliteDalGenEngine sqlite: QuickStartSqliteDalGen
Schema | Queries | End2End Test
Config
NpgsqlEngine postgresql: NpgsqlExample
Schema | Queries | End2End Test
Config
useDapper: false targetFramework: net8.0 generateCsproj: true namespaceName: NpgsqlExampleGen overrides: - column: "GetPostgresFunctions:max_integer" csharp_type: type: "int" notNull: false - column: "GetPostgresFunctions:max_varchar" csharp_type: type: "string" notNull: false - column: "GetPostgresFunctions:max_timestamp" csharp_type: type: "DateTime" notNull: true - column: "GetPostgresSpecialTypesCnt:c_json" csharp_type: type: "JsonElement" notNull: false - column: "GetPostgresSpecialTypesCnt:c_jsonb" csharp_type: type: "JsonElement" notNull: false - column: "*:c_json_string_override" csharp_type: type: "string" notNull: false - column: "*:c_xml_string_override" csharp_type: type: "string" notNull: false - column: "*:c_macaddr8" csharp_type: type: "string" notNull: false - column: "*:c_timestamp_noda_instant_override" csharp_type: type: "Instant" notNull: false
Engine postgresql: NpgsqlDapperExample
Schema | Queries | End2End Test
Config
useDapper: true targetFramework: net8.0 generateCsproj: true namespaceName: NpgsqlDapperExampleGen overrides: - column: "GetPostgresFunctions:max_integer" csharp_type: type: "int" notNull: false - column: "GetPostgresFunctions:max_varchar" csharp_type: type: "string" notNull: false - column: "GetPostgresFunctions:max_timestamp" csharp_type: type: "DateTime" notNull: true - column: "GetPostgresSpecialTypesCnt:c_json" csharp_type: type: "JsonElement" notNull: false - column: "GetPostgresSpecialTypesCnt:c_jsonb" csharp_type: type: "JsonElement" notNull: false - column: "*:c_json_string_override" csharp_type: type: "string" notNull: false - column: "*:c_xml_string_override" csharp_type: type: "string" notNull: false - column: "*:c_macaddr8" csharp_type: type: "string" notNull: false - column: "*:c_timestamp_noda_instant_override" csharp_type: type: "Instant" notNull: false
Engine postgresql: NpgsqlLegacyExample
Schema | Queries | End2End Test
Config
useDapper: false targetFramework: netstandard2.0 generateCsproj: true namespaceName: NpgsqlLegacyExampleGen overrides: - column: "GetPostgresFunctions:max_integer" csharp_type: type: "int" notNull: false - column: "GetPostgresFunctions:max_varchar" csharp_type: type: "string" notNull: false - column: "GetPostgresFunctions:max_timestamp" csharp_type: type: "DateTime" notNull: true - column: "GetPostgresSpecialTypesCnt:c_json" csharp_type: type: "JsonElement" notNull: false - column: "GetPostgresSpecialTypesCnt:c_jsonb" csharp_type: type: "JsonElement" notNull: false - column: "*:c_json_string_override" csharp_type: type: "string" notNull: false - column: "*:c_xml_string_override" csharp_type: type: "string" notNull: false - column: "*:c_macaddr8" csharp_type: type: "string" notNull: false - column: "*:c_timestamp_noda_instant_override" csharp_type: type: "Instant" notNull: false
Engine postgresql: NpgsqlDapperLegacyExample
Schema | Queries | End2End Test
Config
useDapper: true targetFramework: netstandard2.0 generateCsproj: true namespaceName: NpgsqlDapperLegacyExampleGen overrides: - column: "GetPostgresFunctions:max_integer" csharp_type: type: "int" notNull: false - column: "GetPostgresFunctions:max_varchar" csharp_type: type: "string" notNull: false - column: "GetPostgresFunctions:max_timestamp" csharp_type: type: "DateTime" notNull: true - column: "GetPostgresSpecialTypesCnt:c_json" csharp_type: type: "JsonElement" notNull: false - column: "GetPostgresSpecialTypesCnt:c_jsonb" csharp_type: type: "JsonElement" notNull: false - column: "*:c_json_string_override" csharp_type: type: "string" notNull: false - column: "*:c_xml_string_override" csharp_type: type: "string" notNull: false - column: "*:c_macaddr8" csharp_type: type: "string" notNull: false - column: "*:c_timestamp_noda_instant_override" csharp_type: type: "Instant" notNull: false
Engine mysql: MySqlConnectorExample
Schema | Queries | End2End Test
Config
useDapper: false targetFramework: net8.0 generateCsproj: true namespaceName: MySqlConnectorExampleGen overrides: - column: "GetMysqlFunctions:max_int" csharp_type: type: "int" notNull: false - column: "GetMysqlFunctions:max_varchar" csharp_type: type: "string" notNull: false - column: "GetMysqlFunctions:max_timestamp" csharp_type: type: "DateTime" notNull: true - column: "*:c_json_string_override" csharp_type: type: "string" notNull: false - column: "*:c_timestamp_noda_instant_override" csharp_type: type: "Instant" notNull: false
Engine mysql: MySqlConnectorDapperExample
Schema | Queries | End2End Test
Config
useDapper: true targetFramework: net8.0 generateCsproj: true namespaceName: MySqlConnectorDapperExampleGen overrides: - column: "GetMysqlFunctions:max_int" csharp_type: type: "int" notNull: false - column: "GetMysqlFunctions:max_varchar" csharp_type: type: "string" notNull: false - column: "GetMysqlFunctions:max_timestamp" csharp_type: type: "DateTime" notNull: true - column: "*:c_json_string_override" csharp_type: type: "string" notNull: false - column: "*:c_timestamp_noda_instant_override" csharp_type: type: "Instant" notNull: false
Engine mysql: MySqlConnectorLegacyExample
Schema | Queries | End2End Test
Config
useDapper: false targetFramework: netstandard2.0 generateCsproj: true namespaceName: MySqlConnectorLegacyExampleGen overrides: - column: "GetMysqlFunctions:max_int" csharp_type: type: "int" notNull: false - column: "GetMysqlFunctions:max_varchar" csharp_type: type: "string" notNull: false - column: "GetMysqlFunctions:max_timestamp" csharp_type: type: "DateTime" notNull: true - column: "*:c_json_string_override" csharp_type: type: "string" notNull: false - column: "*:c_timestamp_noda_instant_override" csharp_type: type: "Instant" notNull: false
Engine mysql: MySqlConnectorDapperLegacyExample
Schema | Queries | End2End Test
Config
useDapper: true targetFramework: netstandard2.0 generateCsproj: true namespaceName: MySqlConnectorDapperLegacyExampleGen overrides: - column: "GetMysqlFunctions:max_int" csharp_type: type: "int" notNull: false - column: "GetMysqlFunctions:max_varchar" csharp_type: type: "string" notNull: false - column: "GetMysqlFunctions:max_timestamp" csharp_type: type: "DateTime" notNull: true - column: "*:c_json_string_override" csharp_type: type: "string" notNull: false - column: "*:c_timestamp_noda_instant_override" csharp_type: type: "Instant" notNull: false
Engine sqlite: SqliteExample
Schema | Queries | End2End Test
Config
useDapper: false targetFramework: net8.0 generateCsproj: true namespaceName: SqliteExampleGen overrides: - column: "GetSqliteFunctions:max_integer" csharp_type: type: "int" - column: "GetSqliteFunctions:max_varchar" csharp_type: type: "string" - column: "GetSqliteFunctions:max_real" csharp_type: type: "decimal" - column: "*:c_text_datetime_override" csharp_type: type: "DateTime" - column: "*:c_integer_datetime_override" csharp_type: type: "DateTime" - column: "*:c_text_bool_override" csharp_type: type: "bool" - column: "*:c_integer_bool_override" csharp_type: type: "bool" - column: "*:c_text_noda_instant_override" csharp_type: type: "Instant" - column: "*:c_integer_noda_instant_override" csharp_type: type: "Instant"
Engine sqlite: SqliteDapperExample
Schema | Queries | End2End Test
Config
useDapper: true targetFramework: net8.0 generateCsproj: true namespaceName: SqliteDapperExampleGen overrides: - column: "GetSqliteFunctions:max_integer" csharp_type: type: "int" - column: "GetSqliteFunctions:max_varchar" csharp_type: type: "string" - column: "GetSqliteFunctions:max_real" csharp_type: type: "decimal" - column: "*:c_text_datetime_override" csharp_type: type: "DateTime" - column: "*:c_integer_datetime_override" csharp_type: type: "DateTime" - column: "*:c_text_bool_override" csharp_type: type: "bool" - column: "*:c_integer_bool_override" csharp_type: type: "bool" - column: "*:c_text_noda_instant_override" csharp_type: type: "Instant" - column: "*:c_integer_noda_instant_override" csharp_type: type: "Instant"
Engine sqlite: SqliteLegacyExample
Schema | Queries | End2End Test
Config
useDapper: false targetFramework: netstandard2.0 generateCsproj: true namespaceName: SqliteLegacyExampleGen overrides: - column: "GetSqliteFunctions:max_integer" csharp_type: type: "int" - column: "GetSqliteFunctions:max_varchar" csharp_type: type: "string" - column: "GetSqliteFunctions:max_real" csharp_type: type: "decimal" - column: "*:c_text_datetime_override" csharp_type: type: "DateTime" - column: "*:c_integer_datetime_override" csharp_type: type: "DateTime" - column: "*:c_text_bool_override" csharp_type: type: "bool" - column: "*:c_integer_bool_override" csharp_type: type: "bool" - column: "*:c_text_noda_instant_override" csharp_type: type: "Instant" - column: "*:c_integer_noda_instant_override" csharp_type: type: "Instant"
Engine sqlite: SqliteDapperLegacyExample
Schema | Queries | End2End Test
Config
useDapper: true targetFramework: netstandard2.0 generateCsproj: true namespaceName: SqliteDapperLegacyExampleGen overrides: - column: "GetSqliteFunctions:max_integer" csharp_type: type: "int" - column: "GetSqliteFunctions:max_varchar" csharp_type: type: "string" - column: "GetSqliteFunctions:max_real" csharp_type: type: "decimal" - column: "*:c_text_datetime_override" csharp_type: type: "DateTime" - column: "*:c_integer_datetime_override" csharp_type: type: "DateTime" - column: "*:c_text_bool_override" csharp_type: type: "bool" - column: "*:c_integer_bool_override" csharp_type: type: "bool" - column: "*:c_text_noda_instant_override" csharp_type: type: "Instant" - column: "*:c_integer_noda_instant_override" csharp_type: type: "Instant"