Skip to content

Commit 6eb5df5

Browse files
tmp
1 parent 526e276 commit 6eb5df5

File tree

2 files changed

+13
-65
lines changed

2 files changed

+13
-65
lines changed

Makefile

-37
This file was deleted.

README.md

+13-28
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,47 @@
11
[![CI](https://github.com/DaredevilOSS/sqlc-gen-csharp/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/DaredevilOSS/sqlc-gen-csharp/actions/workflows/main.yml)
22

3-
# sqlc-gen-csharp
3+
# sqlc-gen-ruby
44
## Usage
55
### Configuration
66
```yaml
77
version: "2"
88
plugins:
9-
- name: csharp
9+
- name: ruby
1010
wasm:
11-
url: https://github.com/DaredevilOSS/sqlc-gen-csharp/releases/download/v0.10.0/sqlc-gen-csharp.wasm
12-
sha256: 613ae249a541ab95c97b362bd1b0b572970edcad5eb2a11806a52d3f95e0f65f
11+
url: TBD
12+
sha256: TBD
1313
sql:
1414
# PostgreSQL Example
1515
- schema: "examples/authors/postgresql/schema.sql"
1616
queries: "examples/authors/postgresql/query.sql"
1717
engine: "postgresql"
1818
codegen:
19-
- plugin: csharp
20-
out: NpgsqlExample
19+
- plugin: ruby
20+
out: examples/pg
2121
options:
22-
driver: Npgsql
23-
targetFramework: net8.0
24-
generateCsproj: true
25-
filePerQuery: false
22+
driver: pg
2623
# MySQL Example
2724
- schema: "examples/authors/mysql/schema.sql"
2825
queries: "examples/authors/mysql/query.sql"
2926
engine: "mysql"
3027
codegen:
31-
- plugin: csharp
32-
out: MySqlConnectorExample
28+
- plugin: ruby
29+
out: examples/mysql2
3330
options:
34-
driver: MySqlConnector
31+
driver: mysql2
3532
```
3633
### Options Documentation
37-
| Option | Possible values | Info |
38-
|------------|---------------------------|-|
39-
| targetFramework | default: `net8.0`<br/>values: `netstandard2.0`, `netstandard2.1`, `net8.0` |Decide on the right target framework for your generated code, meaning the generated code will be compiled to the specified runtime.<br/>For more information and help deciding on the right value, refer to the [Microsoft .NET Standard documentation](https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-1-0). |
40-
| generateCsproj | default: `true`<br/>values: `false`,`true` | This option is designed to assist you with the integration of SQLC and csharp by generating a `.csproj` file. This converts the generated output to a dynamic link library (DLL), simply a project that you can easily incorporate into your build process. |
41-
| filePerQuery | default: `false`<br/>values: `false`,`true` | This option allows users control on which `.cs` files to generate, when false it's one file per `.sql` SQLC query file, and when true it's one file per query. |
42-
34+
TBD
4335
4436
## Supported SQL Engines
45-
- MySQL via [MySqlConnector](https://www.nuget.org/packages/MySqlConnector) package - [MySqlConnectorDriver](MySqlConnectorDriver/MySqlConnectorDriver.csproj)
46-
- PostgreSQL via [Npgsql](https://www.nuget.org/packages/Npgsql) package - [NpgsqlDriver](NpgsqlDriver/NpgsqlDriver.csproj)
47-
37+
- MySQL via [mysql2](https://rubygems.org/gems/mysql2) package - [Mysql2Driver](Drivers/Mysql2Driver.cs)
38+
- PostgreSQL via [pg](https://rubygems.org/gems/pg) package - [PgDriver](Drivers/PgDriver.cs)
4839
4940
## Examples & Tests
5041
The below examples in here are automatically tested:
5142
- [MySqlConnectorExample](MySqlConnectorExample/MySqlConnectorExample.csproj)
5243
- [NpgsqlExample](NpgsqlExample/NpgsqlExample.csproj)
5344
54-
55-
56-
<br/>
57-
<br/>
58-
<br/>
59-
6045
# Contributing
6146
## Local plugin development
6247
### Prerequisites

0 commit comments

Comments
 (0)