Merge branch 'arjen-ag5/master' into pg_arrays
# Conflicts: # generator/template/model_template.go # generator/template/sql_builder_template.go # internal/jet/expression.go # postgres/cast.go # postgres/columns.go # postgres/expressions.go # postgres/insert_statement_test.go # postgres/literal.go # tests/postgres/alltypes_test.go # tests/postgres/generator_template_test.go # tests/postgres/scan_test.go # tests/postgres/select_test.go
This commit is contained in:
commit
45d4ced9b0
25 changed files with 575 additions and 85 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"database/sql"
|
||||
"github.com/go-jet/jet/v2/internal/utils/ptr"
|
||||
"github.com/lib/pq"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
|
@ -1852,7 +1853,7 @@ ORDER BY film.film_id ASC;
|
|||
Rating: &gRating,
|
||||
RentalDuration: 3,
|
||||
LastUpdate: *testutils.TimestampWithoutTimeZone("2013-05-26 14:50:58.951", 3),
|
||||
SpecialFeatures: ptr.Of("{Trailers,\"Deleted Scenes\"}"),
|
||||
SpecialFeatures: &pq.StringArray{"Trailers", "Deleted Scenes"},
|
||||
Fulltext: "'ace':1 'administr':9 'ancient':19 'astound':4 'car':17 'china':20 'databas':8 'epistl':5 'explor':12 'find':15 'goldfing':2 'must':14",
|
||||
})
|
||||
}
|
||||
|
|
@ -2783,7 +2784,6 @@ ORDER BY actor.actor_id ASC, film.film_id ASC;
|
|||
require.NoError(t, err)
|
||||
|
||||
//testutils.SaveJSONFile(dest, "./testdata/results/postgres/quick-start-dest.json")
|
||||
|
||||
testutils.AssertJSONFile(t, dest, "./testdata/results/postgres/quick-start-dest.json")
|
||||
|
||||
var dest2 []struct {
|
||||
|
|
@ -2798,7 +2798,7 @@ ORDER BY actor.actor_id ASC, film.film_id ASC;
|
|||
require.NoError(t, err)
|
||||
})
|
||||
|
||||
//testutils.SaveJSONFile(dest2, "./testdata/results/postgres/quick-start-dest2.json")
|
||||
//testutils.SaveJSONFile(dest, "./testdata/results/postgres/quick-start-dest2.json")
|
||||
testutils.AssertJSONFile(t, dest2, "./testdata/results/postgres/quick-start-dest2.json")
|
||||
}
|
||||
|
||||
|
|
@ -3389,7 +3389,10 @@ func TestSelectRecursionScanNxM(t *testing.T) {
|
|||
"ReplacementCost": 20.99,
|
||||
"Rating": "PG",
|
||||
"LastUpdate": "2013-05-26T14:50:58.951Z",
|
||||
"SpecialFeatures": "{\"Deleted Scenes\",\"Behind the Scenes\"}",
|
||||
"SpecialFeatures": [
|
||||
"Deleted Scenes",
|
||||
"Behind the Scenes"
|
||||
],
|
||||
"Fulltext": "'academi':1 'battl':15 'canadian':20 'dinosaur':2 'drama':5 'epic':4 'feminist':8 'mad':11 'must':14 'rocki':21 'scientist':12 'teacher':17",
|
||||
"Actors": [
|
||||
{
|
||||
|
|
@ -3413,7 +3416,10 @@ func TestSelectRecursionScanNxM(t *testing.T) {
|
|||
"ReplacementCost": 9.99,
|
||||
"Rating": "R",
|
||||
"LastUpdate": "2013-05-26T14:50:58.951Z",
|
||||
"SpecialFeatures": "{Trailers,\"Deleted Scenes\"}",
|
||||
"SpecialFeatures": [
|
||||
"Trailers",
|
||||
"Deleted Scenes"
|
||||
],
|
||||
"Fulltext": "'anaconda':1 'australia':18 'confess':2 'dentist':8,11 'display':5 'fight':14 'girl':16 'lacklustur':4 'must':13",
|
||||
"Actors": [
|
||||
{
|
||||
|
|
@ -3461,7 +3467,10 @@ func TestSelectRecursionScanNxM(t *testing.T) {
|
|||
"ReplacementCost": 20.99,
|
||||
"Rating": "PG",
|
||||
"LastUpdate": "2013-05-26T14:50:58.951Z",
|
||||
"SpecialFeatures": "{\"Deleted Scenes\",\"Behind the Scenes\"}",
|
||||
"SpecialFeatures": [
|
||||
"Deleted Scenes",
|
||||
"Behind the Scenes"
|
||||
],
|
||||
"Fulltext": "'academi':1 'battl':15 'canadian':20 'dinosaur':2 'drama':5 'epic':4 'feminist':8 'mad':11 'must':14 'rocki':21 'scientist':12 'teacher':17",
|
||||
"Actors": null
|
||||
},
|
||||
|
|
@ -3477,7 +3486,10 @@ func TestSelectRecursionScanNxM(t *testing.T) {
|
|||
"ReplacementCost": 9.99,
|
||||
"Rating": "R",
|
||||
"LastUpdate": "2013-05-26T14:50:58.951Z",
|
||||
"SpecialFeatures": "{Trailers,\"Deleted Scenes\"}",
|
||||
"SpecialFeatures": [
|
||||
"Trailers",
|
||||
"Deleted Scenes"
|
||||
],
|
||||
"Fulltext": "'anaconda':1 'australia':18 'confess':2 'dentist':8,11 'display':5 'fight':14 'girl':16 'lacklustur':4 'must':13",
|
||||
"Actors": null
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue