Update README.md
This commit is contained in:
parent
dececa3241
commit
9821e5ded1
1 changed files with 6 additions and 6 deletions
10
README.md
10
README.md
|
|
@ -25,7 +25,7 @@ _*Support for additional databases will be added in future jet releases._
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
1) Type-safe SQL Builder
|
1) Auto-generated type-safe SQL Builder
|
||||||
- Types - boolean, integers(smallint, integer, bigint), floats(real, numeric, decimal, double precision),
|
- Types - boolean, integers(smallint, integer, bigint), floats(real, numeric, decimal, double precision),
|
||||||
strings(text, character, character varying), date, time(z), timestamp(z) and enums.
|
strings(text, character, character varying), date, time(z), timestamp(z) and enums.
|
||||||
- Statements:
|
- Statements:
|
||||||
|
|
@ -34,8 +34,8 @@ _*Support for additional databases will be added in future jet releases._
|
||||||
* UPDATE (SET, WHERE, RETURNING),
|
* UPDATE (SET, WHERE, RETURNING),
|
||||||
* DELETE (WHERE, RETURNING),
|
* DELETE (WHERE, RETURNING),
|
||||||
* LOCK (IN, NOWAIT)
|
* LOCK (IN, NOWAIT)
|
||||||
2) Auto-generated Data Model types - Go structs mapped to database type (table or enum), used to store
|
2) Auto-generated Data Model types - Go types mapped to database type (table or enum), used to store
|
||||||
result of database queries. Can be combined to create desired destination structure.
|
result of database queries. Can be combined to create desired query result destination.
|
||||||
3) Query execution with result mapping to arbitrary destination structure.
|
3) Query execution with result mapping to arbitrary destination structure.
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
@ -163,7 +163,7 @@ query - parametrized query\
|
||||||
args - parameters for the query
|
args - parameters for the query
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Click to see `query` and `arg`</summary>
|
<summary>Click to see `query` and `args`</summary>
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
SELECT actor.actor_id AS "actor.actor_id",
|
SELECT actor.actor_id AS "actor.actor_id",
|
||||||
|
|
@ -258,7 +258,7 @@ above statement. Usually this is the most complex and tedious work, but with Jet
|
||||||
First we have to create desired structure to store query result set.
|
First we have to create desired structure to store query result set.
|
||||||
This is done be combining autogenerated model types or it can be done manually(see [wiki](https://github.com/go-jet/jet/wiki/Scan-to-arbitrary-destination) for more information).
|
This is done be combining autogenerated model types or it can be done manually(see [wiki](https://github.com/go-jet/jet/wiki/Scan-to-arbitrary-destination) for more information).
|
||||||
|
|
||||||
Let's say this is our desired structure:
|
Let's say this is our desired structure, created by combining auto-generated model types:
|
||||||
```go
|
```go
|
||||||
var dest []struct {
|
var dest []struct {
|
||||||
model.Actor
|
model.Actor
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue