Formatting fix.

This commit is contained in:
go-jet 2019-07-15 19:55:04 +02:00
parent c78ca8a876
commit 7ed83d4228
4 changed files with 4 additions and 7 deletions

View file

@ -31,7 +31,7 @@ _Support for additional databases will be added in future jet releases._
* DELETE (WHERE, RETURNING), * DELETE (WHERE, RETURNING),
* LOCK (IN, NOWAIT) * LOCK (IN, NOWAIT)
2) Auto-generated Data Model types - Go struct mapped to database type (table or enum) 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. created by combining auto-generated data model types.
## Getting Started ## Getting Started

View file

@ -67,8 +67,7 @@ func TestJoinEverything(t *testing.T) {
). ).
ORDER_BY(Artist.ArtistId, Album.AlbumId, Track.TrackId, ORDER_BY(Artist.ArtistId, Album.AlbumId, Track.TrackId,
Genre.GenreId, MediaType.MediaTypeId, Playlist.PlaylistId, Genre.GenreId, MediaType.MediaTypeId, Playlist.PlaylistId,
Invoice.InvoiceId, Customer.CustomerId). Invoice.InvoiceId, Customer.CustomerId)
WHERE(Artist.ArtistId.LT_EQ(Int(100000)))
var dest []struct { //list of all artist var dest []struct { //list of all artist
model.Artist model.Artist
@ -104,9 +103,7 @@ func TestJoinEverything(t *testing.T) {
err := stmt.Query(db, &dest) err := stmt.Query(db, &dest)
assert.NilError(t, err) assert.NilError(t, err)
assert.Equal(t, len(dest), 275) assert.Equal(t, len(dest), 275)
assertJsonFile(t, "./testdata/joined_everything.json", dest) assertJsonFile(t, "./testdata/joined_everything.json", dest)
} }

View file

@ -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 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: Assuming we are running local postgres database, with user `jet`, database `jetdb` and schema `dvds` we will use this command:
```sh ```sh

View file

@ -31,7 +31,7 @@ Field name is camel case of column name. See below table for type mapping.
| bytea, uuid | | | bytea, uuid | |
| and all remaining types | ColumnString | | and all remaining types | ColumnString |
### Example #### Example
Sql table `address`: Sql table `address`:
``` ```