Formatting fix.
This commit is contained in:
parent
c78ca8a876
commit
7ed83d4228
4 changed files with 4 additions and 7 deletions
|
|
@ -31,7 +31,7 @@ _Support for additional databases will be added in future jet releases._
|
|||
* DELETE (WHERE, RETURNING),
|
||||
* LOCK (IN, NOWAIT)
|
||||
2) Auto-generated Data Model types - Go struct mapped to database type (table or enum)
|
||||
3) Query execution with mapping to arbitrary destination structure - destination structure can be
|
||||
3) Query execution with result set mapping to arbitrary destination structure - destination structure can be
|
||||
created by combining auto-generated data model types.
|
||||
|
||||
## Getting Started
|
||||
|
|
|
|||
|
|
@ -67,8 +67,7 @@ func TestJoinEverything(t *testing.T) {
|
|||
).
|
||||
ORDER_BY(Artist.ArtistId, Album.AlbumId, Track.TrackId,
|
||||
Genre.GenreId, MediaType.MediaTypeId, Playlist.PlaylistId,
|
||||
Invoice.InvoiceId, Customer.CustomerId).
|
||||
WHERE(Artist.ArtistId.LT_EQ(Int(100000)))
|
||||
Invoice.InvoiceId, Customer.CustomerId)
|
||||
|
||||
var dest []struct { //list of all artist
|
||||
model.Artist
|
||||
|
|
@ -104,9 +103,7 @@ func TestJoinEverything(t *testing.T) {
|
|||
err := stmt.Query(db, &dest)
|
||||
|
||||
assert.NilError(t, err)
|
||||
|
||||
assert.Equal(t, len(dest), 275)
|
||||
|
||||
assertJsonFile(t, "./testdata/joined_everything.json", dest)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ Usage of jet:
|
|||
```
|
||||
|
||||
To generate jet SQL Builder and Data Model files from postgres database we need to call `jet` generator with postgres
|
||||
connection parameters and root destination folder path for generated files.
|
||||
connection parameters and root destination folder path for generated files.
|
||||
Assuming we are running local postgres database, with user `jet`, database `jetdb` and schema `dvds` we will use this command:
|
||||
|
||||
```sh
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ Field name is camel case of column name. See below table for type mapping.
|
|||
| bytea, uuid | |
|
||||
| and all remaining types | ColumnString |
|
||||
|
||||
### Example
|
||||
#### Example
|
||||
|
||||
Sql table `address`:
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue