diff --git a/README.md b/README.md index f69a81ce9..308693d39 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![sqlboiler logo](https://i.imgur.com/lMXUTPE.png) [![License](https://img.shields.io/badge/license-BSD-blue.svg)](https://github.com/volatiletech/sqlboiler/blob/master/LICENSE) -[![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4)](https://pkg.go.dev/mod/github.com/volatiletech/sqlboiler/v4) +[![GoDoc](https://img.shields.io/badge/godoc-reference-5272B4)](https://pkg.go.dev/mod/github.com/twitter-payments/sqlboiler/v4) [![Slack](https://img.shields.io/badge/slack-%23general-lightgrey.svg)](https://sqlboiler.from-the.cloud) ![ActionsCI](https://github.com/volatiletech/sqlboiler/workflows/test/badge.svg) [![Go Report Card](https://goreportcard.com/badge/volatiletech/sqlboiler)](http://goreportcard.com/report/volatiletech/sqlboiler) @@ -170,10 +170,10 @@ of that SQLBoiler also confers the following benefits: | Database | Driver Location | | ----------------- | --------------------------------------------------------------------------------------------------- | -| PostgreSQL | [https://github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-psql](drivers/sqlboiler-psql) | -| MySQL | [https://github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-mysql](drivers/sqlboiler-mysql) | -| MSSQLServer 2012+ | [https://github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-mssql](drivers/sqlboiler-mssql) | -| SQLite3 | [https://github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-sqlite3](drivers/sqlboiler-sqlite3) | +| PostgreSQL | [https://github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-psql](drivers/sqlboiler-psql) | +| MySQL | [https://github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-mysql](drivers/sqlboiler-mysql) | +| MSSQLServer 2012+ | [https://github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-mssql](drivers/sqlboiler-mssql) | +| SQLite3 | [https://github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-sqlite3](drivers/sqlboiler-sqlite3) | | CockroachDB | https://github.com/glerchundi/sqlboiler-crdb | **Note:** SQLBoiler supports out of band driver support so you can make your own @@ -187,7 +187,7 @@ For a comprehensive list of available operations and examples please see [Featur ```go import ( // Import this so we don't have to use qm.Limit etc. - . "github.com/volatiletech/sqlboiler/v4/queries/qm" + . "github.com/twitter-payments/sqlboiler/v4/queries/qm" ) // Open handle to database like normal @@ -309,16 +309,16 @@ Ensure you don't forget any /v suffixes or you'll end up on an old version. ```shell # Go 1.16 and above: -go install github.com/volatiletech/sqlboiler/v4@latest -go install github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-psql@latest +go install github.com/twitter-payments/sqlboiler/v4@latest +go install github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-psql@latest # Go 1.15 and below: # Install sqlboiler v4 and the postgresql driver (mysql, mssql, sqlite3 also available) # NOTE: DO NOT run this inside another Go module (like your project) as it will # pollute your go.mod with a bunch of stuff you don't want and your binary # will not get installed. -GO111MODULE=on go get -u -t github.com/volatiletech/sqlboiler/v4 -GO111MODULE=on go get github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-psql +GO111MODULE=on go get -u -t github.com/twitter-payments/sqlboiler/v4 +GO111MODULE=on go get github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-psql ``` To install `sqlboiler` as a dependency in your project use the commands below @@ -327,7 +327,7 @@ into your `go.mod` file at the correct version. ```shell # Do not forget the trailing /v4 and /v8 in the following commands -go get github.com/volatiletech/sqlboiler/v4 +go get github.com/twitter-payments/sqlboiler/v4 # Assuming you're going to use the null package for its additional null types go get github.com/volatiletech/null/v8 ``` @@ -1241,7 +1241,7 @@ safe, but be careful! ```go // Dot import so we can access query mods directly instead of prefixing with "qm." -import . "github.com/volatiletech/sqlboiler/v4/queries/qm" +import . "github.com/twitter-payments/sqlboiler/v4/queries/qm" // Use a raw query against a generated struct (Pilot in this example) // If this query mod exists in your call, it will override the others. @@ -1381,7 +1381,7 @@ in combination with your own custom, non-generated model. ### Binding -For a comprehensive ruleset for `Bind()` you can refer to our [pkg.go.dev](https://pkg.go.dev/github.com/volatiletech/sqlboiler/v4/queries#Bind). +For a comprehensive ruleset for `Bind()` you can refer to our [pkg.go.dev](https://pkg.go.dev/github.com/twitter-payments/sqlboiler/v4/queries#Bind). The `Bind()` [Finisher](#finisher) allows the results of a query built with the [Raw SQL](#raw-query) method or the [Query Builder](#query-building) methods to be bound @@ -1661,7 +1661,7 @@ tx.Rollback() It's also worth noting that there's a way to take advantage of `boil.SetDB()` by using the -[boil.BeginTx()](https://pkg.go.dev/github.com/volatiletech/sqlboiler/v4/boil#BeginTx) +[boil.BeginTx()](https://pkg.go.dev/github.com/twitter-payments/sqlboiler/v4/boil#BeginTx) function. This opens a transaction using the globally stored database. ### Debug Logging @@ -1736,7 +1736,7 @@ greylist in cases where you want to insert a Go zero value. **NOTE:** CreatedAt/UpdatedAt are not included in `Whitelist` automatically. See the documentation for -[boil.Columns.InsertColumnSet](https://pkg.go.dev/github.com/volatiletech/sqlboiler/v4/boil/#Columns.InsertColumnSet) +[boil.Columns.InsertColumnSet](https://pkg.go.dev/github.com/twitter-payments/sqlboiler/v4/boil/#Columns.InsertColumnSet) for more details. ```go @@ -1789,7 +1789,7 @@ documentation above for more details. **NOTE:** CreatedAt/UpdatedAt are not included in `Whitelist` automatically. See the documentation for -[boil.Columns.UpdateColumnSet](https://pkg.go.dev/github.com/volatiletech/sqlboiler/v4/boil/#Columns.UpdateColumnSet) +[boil.Columns.UpdateColumnSet](https://pkg.go.dev/github.com/twitter-payments/sqlboiler/v4/boil/#Columns.UpdateColumnSet) for more details. ```go diff --git a/boil.sh b/boil.sh index 129d8dd61..4cb54271d 100755 --- a/boil.sh +++ b/boil.sh @@ -15,7 +15,7 @@ DRIVER_DB="sqlboiler_driver_test" build() { driver=$1 - buildPath=github.com/volatiletech/sqlboiler/v4 + buildPath=github.com/twitter-payments/sqlboiler/v4 case "${driver}" in all) set -o xtrace diff --git a/boilingcore/aliases.go b/boilingcore/aliases.go index 8a41d7348..44eed6c00 100644 --- a/boilingcore/aliases.go +++ b/boilingcore/aliases.go @@ -5,7 +5,7 @@ import ( "unicode" "unicode/utf8" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers" "github.com/volatiletech/strmangle" ) diff --git a/boilingcore/aliases_test.go b/boilingcore/aliases_test.go index e6e7ba668..ef7de2a9e 100644 --- a/boilingcore/aliases_test.go +++ b/boilingcore/aliases_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers" ) func TestAliasesTables(t *testing.T) { diff --git a/boilingcore/boilingcore.go b/boilingcore/boilingcore.go index 004717673..204a6d71c 100644 --- a/boilingcore/boilingcore.go +++ b/boilingcore/boilingcore.go @@ -15,9 +15,9 @@ import ( "github.com/friendsofgo/errors" "github.com/volatiletech/strmangle" - "github.com/volatiletech/sqlboiler/v4/drivers" - "github.com/volatiletech/sqlboiler/v4/importers" - boiltemplates "github.com/volatiletech/sqlboiler/v4/templates" + "github.com/twitter-payments/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/importers" + boiltemplates "github.com/twitter-payments/sqlboiler/v4/templates" ) var ( @@ -749,7 +749,7 @@ func (s *State) verifyModVersion() error { return fmt.Errorf(fmt.Sprintf("could not read go.mod: %v", err)) } - re, err := regexp.Compile(`github\.com\/volatiletech\/sqlboiler\/v4 v(\d*\.\d*\.\d*)`) + re, err := regexp.Compile(`github\.com\/twitter-payments\/sqlboiler\/v4 v(\d*\.\d*\.\d*)`) if err != nil { return fmt.Errorf(fmt.Sprintf("failed to parse regexp: %v", err)) } @@ -762,7 +762,7 @@ func (s *State) verifyModVersion() error { return fmt.Errorf( "\tsqlboiler version in go.mod (%s) does not match executable version (%s)."+ "\n\tYou can update it with:"+ - "\n\tgo get github.com/volatiletech/sqlboiler/v4", + "\n\tgo get github.com/twitter-payments/sqlboiler/v4", string(match[0]), s.Config.Version, ) diff --git a/boilingcore/boilingcore_test.go b/boilingcore/boilingcore_test.go index 23832c045..3b0717630 100644 --- a/boilingcore/boilingcore_test.go +++ b/boilingcore/boilingcore_test.go @@ -11,11 +11,11 @@ import ( "strconv" "testing" - "github.com/volatiletech/sqlboiler/v4/importers" + "github.com/twitter-payments/sqlboiler/v4/importers" "github.com/volatiletech/strmangle" - "github.com/volatiletech/sqlboiler/v4/drivers" - "github.com/volatiletech/sqlboiler/v4/drivers/mocks" + "github.com/twitter-payments/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers/mocks" ) var state *State @@ -117,7 +117,7 @@ func testNew(t *testing.T, aliases Aliases) { fmt.Println() } - cmd = exec.Command("go", "mod", "edit", fmt.Sprintf("-replace=github.com/volatiletech/sqlboiler/v4=%s", filepath.Dir(string(goModFilePath)))) + cmd = exec.Command("go", "mod", "edit", fmt.Sprintf("-replace=github.com/twitter-payments/sqlboiler/v4=%s", filepath.Dir(string(goModFilePath)))) cmd.Dir = state.Config.OutFolder cmd.Stderr = buf diff --git a/boilingcore/config.go b/boilingcore/config.go index e5be0be4a..469cc16e0 100644 --- a/boilingcore/config.go +++ b/boilingcore/config.go @@ -10,8 +10,8 @@ import ( "github.com/friendsofgo/errors" "github.com/spf13/cast" - "github.com/volatiletech/sqlboiler/v4/drivers" - "github.com/volatiletech/sqlboiler/v4/importers" + "github.com/twitter-payments/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/importers" ) type TagCase string diff --git a/boilingcore/config_test.go b/boilingcore/config_test.go index 01ebc15c4..dad3d4516 100644 --- a/boilingcore/config_test.go +++ b/boilingcore/config_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers" ) func TestConfig_OutputDirDepth(t *testing.T) { diff --git a/boilingcore/output.go b/boilingcore/output.go index d91f870a7..ed9b207be 100644 --- a/boilingcore/output.go +++ b/boilingcore/output.go @@ -13,7 +13,7 @@ import ( "text/template" "github.com/friendsofgo/errors" - "github.com/volatiletech/sqlboiler/v4/importers" + "github.com/twitter-payments/sqlboiler/v4/importers" ) // Copied from the go source @@ -25,7 +25,7 @@ var ( ) var ( - noEditDisclaimerFmt = `// Code generated by SQLBoiler%s(https://github.com/volatiletech/sqlboiler). DO NOT EDIT. + noEditDisclaimerFmt = `// Code generated by SQLBoiler%s(https://github.com/twitter-payments/sqlboiler). DO NOT EDIT. // This file is meant to be re-generated in place and/or deleted at any time. ` diff --git a/boilingcore/templates.go b/boilingcore/templates.go index 82c2cb9a9..c541e2712 100644 --- a/boilingcore/templates.go +++ b/boilingcore/templates.go @@ -16,7 +16,7 @@ import ( "github.com/friendsofgo/errors" "github.com/volatiletech/strmangle" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers" ) // templateData for sqlboiler templates diff --git a/boilingcore/text_helpers.go b/boilingcore/text_helpers.go index 7803f7063..74ab07596 100644 --- a/boilingcore/text_helpers.go +++ b/boilingcore/text_helpers.go @@ -3,7 +3,7 @@ package boilingcore import ( "strings" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers" "github.com/volatiletech/strmangle" ) @@ -71,8 +71,8 @@ func txtNameToOne(fk drivers.ForeignKey) (localFn, foreignFn string) { // // The output of the foreign key is the name for that side of the relationship. // -// | tags | | tags_videos | | videos | -// | id | | tag_id, video_id | | id | +// | tags | | tags_videos | | videos | +// | id | | tag_id, video_id | | id | // // In this setup the lhs is the tag_id foreign key, and so the lhsFn will // refer to "how to name the lhs" which in this case should be tags. And diff --git a/boilingcore/text_helpers_test.go b/boilingcore/text_helpers_test.go index 4a7b644b9..63ecba480 100644 --- a/boilingcore/text_helpers_test.go +++ b/boilingcore/text_helpers_test.go @@ -3,7 +3,7 @@ package boilingcore import ( "testing" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers" ) func TestTxtNameToOne(t *testing.T) { diff --git a/drivers/binary_driver.go b/drivers/binary_driver.go index 242475a5a..79caa32a2 100644 --- a/drivers/binary_driver.go +++ b/drivers/binary_driver.go @@ -8,7 +8,7 @@ import ( "os/exec" "github.com/friendsofgo/errors" - "github.com/volatiletech/sqlboiler/v4/importers" + "github.com/twitter-payments/sqlboiler/v4/importers" ) type binaryDriver string diff --git a/drivers/interface.go b/drivers/interface.go index e74cb4131..93e5ce365 100644 --- a/drivers/interface.go +++ b/drivers/interface.go @@ -9,7 +9,7 @@ import ( "github.com/friendsofgo/errors" "github.com/volatiletech/strmangle" - "github.com/volatiletech/sqlboiler/v4/importers" + "github.com/twitter-payments/sqlboiler/v4/importers" ) // These constants are used in the config map passed into the driver diff --git a/drivers/mocks/mock.go b/drivers/mocks/mock.go index 63d1fc5ec..09c4b6306 100644 --- a/drivers/mocks/mock.go +++ b/drivers/mocks/mock.go @@ -1,8 +1,8 @@ package mocks import ( - "github.com/volatiletech/sqlboiler/v4/drivers" - "github.com/volatiletech/sqlboiler/v4/importers" + "github.com/twitter-payments/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/importers" "github.com/volatiletech/strmangle" ) diff --git a/drivers/registration_test.go b/drivers/registration_test.go index c57b9775d..e0929a544 100644 --- a/drivers/registration_test.go +++ b/drivers/registration_test.go @@ -3,7 +3,7 @@ package drivers import ( "testing" - "github.com/volatiletech/sqlboiler/v4/importers" + "github.com/twitter-payments/sqlboiler/v4/importers" ) type testRegistrationDriver struct{} diff --git a/drivers/sqlboiler-mssql/driver/mssql.go b/drivers/sqlboiler-mssql/driver/mssql.go index 1156b7c87..1855f1856 100644 --- a/drivers/sqlboiler-mssql/driver/mssql.go +++ b/drivers/sqlboiler-mssql/driver/mssql.go @@ -14,8 +14,8 @@ import ( _ "github.com/microsoft/go-mssqldb" "github.com/volatiletech/strmangle" - "github.com/volatiletech/sqlboiler/v4/drivers" - "github.com/volatiletech/sqlboiler/v4/importers" + "github.com/twitter-payments/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/importers" ) //go:embed override @@ -556,7 +556,7 @@ func (MSSQLDriver) Imports() (col importers.Collection, err error) { }, ThirdParty: importers.List{ `"github.com/volatiletech/strmangle"`, - `"github.com/volatiletech/sqlboiler/v4/drivers"`, + `"github.com/twitter-payments/sqlboiler/v4/drivers"`, }, }, } @@ -580,7 +580,7 @@ func (MSSQLDriver) Imports() (col importers.Collection, err error) { `"github.com/kat-co/vala"`, `"github.com/friendsofgo/errors"`, `"github.com/spf13/viper"`, - `"github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-mssql/driver"`, + `"github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-mssql/driver"`, `"github.com/volatiletech/randomize"`, `_ "github.com/microsoft/go-mssqldb"`, }, @@ -640,10 +640,10 @@ func (MSSQLDriver) Imports() (col importers.Collection, err error) { Standard: importers.List{`"time"`}, }, "types.Decimal": { - Standard: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + Standard: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.NullDecimal": { - Standard: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + Standard: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "mssql.UniqueIdentifier": { Standard: importers.List{`"github.com/microsoft/go-mssqldb"`}, diff --git a/drivers/sqlboiler-mssql/driver/mssql_test.go b/drivers/sqlboiler-mssql/driver/mssql_test.go index 486522775..555d72ed2 100644 --- a/drivers/sqlboiler-mssql/driver/mssql_test.go +++ b/drivers/sqlboiler-mssql/driver/mssql_test.go @@ -31,7 +31,7 @@ import ( "regexp" "testing" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers" ) var ( diff --git a/drivers/sqlboiler-mssql/main.go b/drivers/sqlboiler-mssql/main.go index e46b1e400..592f69299 100644 --- a/drivers/sqlboiler-mssql/main.go +++ b/drivers/sqlboiler-mssql/main.go @@ -1,8 +1,8 @@ package main import ( - "github.com/volatiletech/sqlboiler/v4/drivers" - "github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-mssql/driver" + "github.com/twitter-payments/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-mssql/driver" ) func main() { diff --git a/drivers/sqlboiler-mysql/driver/mysql.go b/drivers/sqlboiler-mysql/driver/mysql.go index 6c54bf5ba..b71e2a4bc 100644 --- a/drivers/sqlboiler-mysql/driver/mysql.go +++ b/drivers/sqlboiler-mysql/driver/mysql.go @@ -13,8 +13,8 @@ import ( "github.com/go-sql-driver/mysql" "github.com/volatiletech/strmangle" - "github.com/volatiletech/sqlboiler/v4/drivers" - "github.com/volatiletech/sqlboiler/v4/importers" + "github.com/twitter-payments/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/importers" ) //go:embed override @@ -625,7 +625,7 @@ func (MySQLDriver) Imports() (col importers.Collection, err error) { }, ThirdParty: importers.List{ `"github.com/volatiletech/strmangle"`, - `"github.com/volatiletech/sqlboiler/v4/drivers"`, + `"github.com/twitter-payments/sqlboiler/v4/drivers"`, }, }, } @@ -651,7 +651,7 @@ func (MySQLDriver) Imports() (col importers.Collection, err error) { `"github.com/kat-co/vala"`, `"github.com/friendsofgo/errors"`, `"github.com/spf13/viper"`, - `"github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-mysql/driver"`, + `"github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-mysql/driver"`, `"github.com/volatiletech/randomize"`, `_ "github.com/go-sql-driver/mysql"`, }, @@ -715,13 +715,13 @@ func (MySQLDriver) Imports() (col importers.Collection, err error) { Standard: importers.List{`"time"`}, }, "types.JSON": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.Decimal": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.NullDecimal": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, } return col, err diff --git a/drivers/sqlboiler-mysql/driver/mysql_test.go b/drivers/sqlboiler-mysql/driver/mysql_test.go index 32ff9a543..3cbee3199 100644 --- a/drivers/sqlboiler-mysql/driver/mysql_test.go +++ b/drivers/sqlboiler-mysql/driver/mysql_test.go @@ -19,7 +19,7 @@ import ( "testing" "github.com/stretchr/testify/require" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers" ) var ( diff --git a/drivers/sqlboiler-mysql/main.go b/drivers/sqlboiler-mysql/main.go index 409cee2fa..4eabfeb20 100644 --- a/drivers/sqlboiler-mysql/main.go +++ b/drivers/sqlboiler-mysql/main.go @@ -1,8 +1,8 @@ package main import ( - "github.com/volatiletech/sqlboiler/v4/drivers" - "github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-mysql/driver" + "github.com/twitter-payments/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-mysql/driver" ) func main() { diff --git a/drivers/sqlboiler-psql/driver/psql.go b/drivers/sqlboiler-psql/driver/psql.go index ad5e2cab1..cf32f2f43 100644 --- a/drivers/sqlboiler-psql/driver/psql.go +++ b/drivers/sqlboiler-psql/driver/psql.go @@ -13,12 +13,12 @@ import ( "strings" "sync" - "github.com/volatiletech/sqlboiler/v4/importers" + "github.com/twitter-payments/sqlboiler/v4/importers" "github.com/friendsofgo/errors" "github.com/volatiletech/strmangle" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers" // Side-effect import sql driver _ "github.com/lib/pq" @@ -794,11 +794,11 @@ func (p *PostgresDriver) TranslateColumnType(c drivers.Column) drivers.Column { c.Type = "null.Float64" case "real": c.Type = "null.Float32" - case "bit", "interval", "bit varying", "character", "money", "character varying", "cidr", "inet", "macaddr", "text", "uuid", "xml": + case "bit", "interval", "bit varying", "character", "money", "character varying", "cidr", "inet", "macaddr", "text", "xml": c.Type = "null.String" case `"char"`: c.Type = "null.Byte" - case "bytea": + case "bytea", "uuid": c.Type = "null.Bytes" case "json", "jsonb": c.Type = "null.JSON" @@ -859,13 +859,13 @@ func (p *PostgresDriver) TranslateColumnType(c drivers.Column) drivers.Column { c.Type = "float64" case "real": c.Type = "float32" - case "bit", "interval", "uuint", "bit varying", "character", "money", "character varying", "cidr", "inet", "macaddr", "text", "uuid", "xml": + case "bit", "interval", "uuint", "bit varying", "character", "money", "character varying", "cidr", "inet", "macaddr", "text", "xml": c.Type = "string" case `"char"`: c.Type = "types.Byte" case "json", "jsonb": c.Type = "types.JSON" - case "bytea": + case "bytea", "uuid": c.Type = "[]byte" case "boolean": c.Type = "bool" @@ -926,9 +926,9 @@ func getArrayType(c drivers.Column) (string, string) { switch *c.ArrType { case "bigint", "bigserial", "integer", "serial", "smallint", "smallserial", "oid": return "types.Int64Array", *c.ArrType - case "bytea": + case "bytea", "uuid": return "types.BytesArray", *c.ArrType - case "bit", "interval", "uuint", "bit varying", "character", "money", "character varying", "cidr", "inet", "macaddr", "text", "uuid", "xml": + case "bit", "interval", "uuint", "bit varying", "character", "money", "character varying", "cidr", "inet", "macaddr", "text", "xml": return "types.StringArray", *c.ArrType case "boolean": return "types.BoolArray", *c.ArrType @@ -943,9 +943,9 @@ func getArrayType(c drivers.Column) (string, string) { switch c.UDTName { case "_int4", "_int8": return "types.Int64Array", c.UDTName - case "_bytea": + case "_bytea", "_uuid": return "types.BytesArray", c.UDTName - case "_bit", "_interval", "_varbit", "_char", "_money", "_varchar", "_cidr", "_inet", "_macaddr", "_citext", "_text", "_uuid", "_xml": + case "_bit", "_interval", "_varbit", "_char", "_money", "_varchar", "_cidr", "_inet", "_macaddr", "_citext", "_text", "_xml": return "types.StringArray", c.UDTName case "_bool": return "types.BoolArray", c.UDTName @@ -976,7 +976,7 @@ func (p PostgresDriver) Imports() (importers.Collection, error) { }, ThirdParty: importers.List{ `"github.com/volatiletech/strmangle"`, - `"github.com/volatiletech/sqlboiler/v4/drivers"`, + `"github.com/twitter-payments/sqlboiler/v4/drivers"`, }, }, } @@ -1001,7 +1001,7 @@ func (p PostgresDriver) Imports() (importers.Collection, error) { `"github.com/kat-co/vala"`, `"github.com/friendsofgo/errors"`, `"github.com/spf13/viper"`, - `"github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-psql/driver"`, + `"github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-psql/driver"`, `"github.com/volatiletech/randomize"`, `_ "github.com/lib/pq"`, }, @@ -1063,79 +1063,79 @@ func (p PostgresDriver) Imports() (importers.Collection, error) { Standard: importers.List{`"time"`}, }, "types.JSON": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.Decimal": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.Byte": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.BytesArray": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.Int64Array": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.Float64Array": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.BoolArray": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.StringArray": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.DecimalArray": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.HStore": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "pgeo.Point": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "pgeo.Line": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "pgeo.Lseg": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "pgeo.Box": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "pgeo.Path": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "pgeo.Polygon": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "types.NullDecimal": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "pgeo.Circle": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "pgeo.NullPoint": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "pgeo.NullLine": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "pgeo.NullLseg": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "pgeo.NullBox": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "pgeo.NullPath": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "pgeo.NullPolygon": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, "pgeo.NullCircle": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types/pgeo"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types/pgeo"`}, }, } diff --git a/drivers/sqlboiler-psql/driver/psql.golden.enums.json b/drivers/sqlboiler-psql/driver/psql.golden.enums.json index 35db907d0..12a9954d8 100644 --- a/drivers/sqlboiler-psql/driver/psql.golden.enums.json +++ b/drivers/sqlboiler-psql/driver/psql.golden.enums.json @@ -1580,7 +1580,7 @@ }, { "name": "uuid_zero", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -1595,7 +1595,7 @@ }, { "name": "uuid_one", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -1610,7 +1610,7 @@ }, { "name": "uuid_two", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -1625,7 +1625,7 @@ }, { "name": "uuid_three", - "type": "string", + "type": "[]byte", "db_type": "uuid", "default": "", "comment": "", @@ -1640,7 +1640,7 @@ }, { "name": "uuid_four", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "'6ba7b810-9dad-11d1-80b4-00c04fd430c8'::uuid", "comment": "", @@ -1655,7 +1655,7 @@ }, { "name": "uuid_five", - "type": "string", + "type": "[]byte", "db_type": "uuid", "default": "'6ba7b810-9dad-11d1-80b4-00c04fd430c8'::uuid", "comment": "", @@ -1702,7 +1702,7 @@ "name": "timestamp_notz", "type": "null.Time", "db_type": "timestamp without time zone", - "default": "timezone('utc'::text, now())", + "default": "(now() AT TIME ZONE 'utc'::text)", "comment": "", "nullable": true, "unique": false, @@ -1717,7 +1717,7 @@ "name": "timestamp_tz", "type": "null.Time", "db_type": "timestamp with time zone", - "default": "timezone('utc'::text, now())", + "default": "(now() AT TIME ZONE 'utc'::text)", "comment": "", "nullable": true, "unique": false, @@ -4260,7 +4260,7 @@ }, { "name": "uuid_zero", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -4275,7 +4275,7 @@ }, { "name": "uuid_one", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -4290,7 +4290,7 @@ }, { "name": "uuid_two", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -4305,7 +4305,7 @@ }, { "name": "uuid_three", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -4320,7 +4320,7 @@ }, { "name": "uuid_four", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -4335,7 +4335,7 @@ }, { "name": "uuid_five", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -6661,7 +6661,7 @@ }, { "name": "uuid_zero", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -6676,7 +6676,7 @@ }, { "name": "uuid_one", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -6691,7 +6691,7 @@ }, { "name": "uuid_two", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -6706,7 +6706,7 @@ }, { "name": "uuid_three", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -6721,7 +6721,7 @@ }, { "name": "uuid_four", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -6736,7 +6736,7 @@ }, { "name": "uuid_five", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", diff --git a/drivers/sqlboiler-psql/driver/psql.golden.json b/drivers/sqlboiler-psql/driver/psql.golden.json index f1e20fb42..0b7f805bc 100644 --- a/drivers/sqlboiler-psql/driver/psql.golden.json +++ b/drivers/sqlboiler-psql/driver/psql.golden.json @@ -1580,7 +1580,7 @@ }, { "name": "uuid_zero", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -1595,7 +1595,7 @@ }, { "name": "uuid_one", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -1610,7 +1610,7 @@ }, { "name": "uuid_two", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -1625,7 +1625,7 @@ }, { "name": "uuid_three", - "type": "string", + "type": "[]byte", "db_type": "uuid", "default": "", "comment": "", @@ -1640,7 +1640,7 @@ }, { "name": "uuid_four", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "'6ba7b810-9dad-11d1-80b4-00c04fd430c8'::uuid", "comment": "", @@ -1655,7 +1655,7 @@ }, { "name": "uuid_five", - "type": "string", + "type": "[]byte", "db_type": "uuid", "default": "'6ba7b810-9dad-11d1-80b4-00c04fd430c8'::uuid", "comment": "", @@ -1702,7 +1702,7 @@ "name": "timestamp_notz", "type": "null.Time", "db_type": "timestamp without time zone", - "default": "timezone('utc'::text, now())", + "default": "(now() AT TIME ZONE 'utc'::text)", "comment": "", "nullable": true, "unique": false, @@ -1717,7 +1717,7 @@ "name": "timestamp_tz", "type": "null.Time", "db_type": "timestamp with time zone", - "default": "timezone('utc'::text, now())", + "default": "(now() AT TIME ZONE 'utc'::text)", "comment": "", "nullable": true, "unique": false, @@ -4260,7 +4260,7 @@ }, { "name": "uuid_zero", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -4275,7 +4275,7 @@ }, { "name": "uuid_one", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -4290,7 +4290,7 @@ }, { "name": "uuid_two", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -4305,7 +4305,7 @@ }, { "name": "uuid_three", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -4320,7 +4320,7 @@ }, { "name": "uuid_four", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -4335,7 +4335,7 @@ }, { "name": "uuid_five", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -6661,7 +6661,7 @@ }, { "name": "uuid_zero", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -6676,7 +6676,7 @@ }, { "name": "uuid_one", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -6691,7 +6691,7 @@ }, { "name": "uuid_two", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -6706,7 +6706,7 @@ }, { "name": "uuid_three", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -6721,7 +6721,7 @@ }, { "name": "uuid_four", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", @@ -6736,7 +6736,7 @@ }, { "name": "uuid_five", - "type": "null.String", + "type": "null.Bytes", "db_type": "uuid", "default": "NULL", "comment": "", diff --git a/drivers/sqlboiler-psql/driver/psql_test.go b/drivers/sqlboiler-psql/driver/psql_test.go index 42f38794f..f7504cca4 100644 --- a/drivers/sqlboiler-psql/driver/psql_test.go +++ b/drivers/sqlboiler-psql/driver/psql_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers" ) var ( diff --git a/drivers/sqlboiler-psql/main.go b/drivers/sqlboiler-psql/main.go index fd10f37c0..8fafd06a4 100644 --- a/drivers/sqlboiler-psql/main.go +++ b/drivers/sqlboiler-psql/main.go @@ -1,8 +1,8 @@ package main import ( - "github.com/volatiletech/sqlboiler/v4/drivers" - "github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-psql/driver" + "github.com/twitter-payments/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-psql/driver" ) func main() { diff --git a/drivers/sqlboiler-sqlite3/driver/sqlite3.go b/drivers/sqlboiler-sqlite3/driver/sqlite3.go index 8aed53f57..0161d02c1 100644 --- a/drivers/sqlboiler-sqlite3/driver/sqlite3.go +++ b/drivers/sqlboiler-sqlite3/driver/sqlite3.go @@ -11,8 +11,8 @@ import ( _ "modernc.org/sqlite" - "github.com/volatiletech/sqlboiler/v4/drivers" - "github.com/volatiletech/sqlboiler/v4/importers" + "github.com/twitter-payments/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/importers" ) //go:embed override @@ -587,7 +587,7 @@ func (SQLiteDriver) Imports() (col importers.Collection, err error) { }, ThirdParty: importers.List{ `"github.com/volatiletech/strmangle"`, - `"github.com/volatiletech/sqlboiler/v4/drivers"`, + `"github.com/twitter-payments/sqlboiler/v4/drivers"`, }, }, } @@ -671,14 +671,14 @@ func (SQLiteDriver) Imports() (col importers.Collection, err error) { Standard: importers.List{`"time"`}, }, "types.Decimal": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.NullDecimal": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "types.JSON": { - ThirdParty: importers.List{`"github.com/volatiletech/sqlboiler/v4/types"`}, + ThirdParty: importers.List{`"github.com/twitter-payments/sqlboiler/v4/types"`}, }, "null.JSON": { ThirdParty: importers.List{`"github.com/volatiletech/null/v8"`}, diff --git a/drivers/sqlboiler-sqlite3/driver/sqlite3_test.go b/drivers/sqlboiler-sqlite3/driver/sqlite3_test.go index b2dd70e33..ce32f1c75 100644 --- a/drivers/sqlboiler-sqlite3/driver/sqlite3_test.go +++ b/drivers/sqlboiler-sqlite3/driver/sqlite3_test.go @@ -13,7 +13,7 @@ import ( "time" "github.com/stretchr/testify/require" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers" _ "modernc.org/sqlite" ) diff --git a/drivers/sqlboiler-sqlite3/main.go b/drivers/sqlboiler-sqlite3/main.go index e72ff3a56..72cede2f8 100644 --- a/drivers/sqlboiler-sqlite3/main.go +++ b/drivers/sqlboiler-sqlite3/main.go @@ -1,8 +1,8 @@ package main import ( - "github.com/volatiletech/sqlboiler/v4/drivers" - "github.com/volatiletech/sqlboiler/v4/drivers/sqlboiler-sqlite3/driver" + "github.com/twitter-payments/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers/sqlboiler-sqlite3/driver" ) func main() { diff --git a/go.mod b/go.mod index 0a88e56d7..067f9d39a 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/volatiletech/sqlboiler/v4 +module github.com/twitter-payments/sqlboiler/v4 go 1.16 @@ -15,7 +15,6 @@ require ( github.com/huandu/xstrings v1.3.2 // indirect github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect - github.com/kat-co/vala v0.0.0-20170210184112-42e1d8b61f12 github.com/lib/pq v1.10.6 github.com/microsoft/go-mssqldb v0.17.0 github.com/mitchellh/copystructure v1.2.0 // indirect diff --git a/go.sum b/go.sum index 0b33f7e50..740dfe49d 100644 --- a/go.sum +++ b/go.sum @@ -298,8 +298,6 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kat-co/vala v0.0.0-20170210184112-42e1d8b61f12 h1:DQVOxR9qdYEybJUr/c7ku34r3PfajaMYXZwgDM7KuSk= -github.com/kat-co/vala v0.0.0-20170210184112-42e1d8b61f12/go.mod h1:u9MdXq/QageOOSGp7qG4XAQsYUMP+V5zEel/Vrl6OOc= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -456,8 +454,6 @@ github.com/volatiletech/null/v8 v8.1.2/go.mod h1:98DbwNoKEpRrYtGjWFctievIfm4n4Mx github.com/volatiletech/randomize v0.0.1 h1:eE5yajattWqTB2/eN8df4dw+8jwAzBtbdo5sbWC4nMk= github.com/volatiletech/randomize v0.0.1/go.mod h1:GN3U0QYqfZ9FOJ67bzax1cqZ5q2xuj2mXrXBjWaRTlY= github.com/volatiletech/strmangle v0.0.1/go.mod h1:F6RA6IkB5vq0yTG4GQ0UsbbRcl3ni9P76i+JrTBKFFg= -github.com/volatiletech/strmangle v0.0.5 h1:CompJPy+lAi9h+YU/IzBR4X2RDRuAuEIP+kjFdyZXcU= -github.com/volatiletech/strmangle v0.0.5/go.mod h1:ycDvbDkjDvhC0NUU8w3fWwl5JEMTV56vTKXzR3GeR+0= github.com/volatiletech/strmangle v0.0.6 h1:AdOYE3B2ygRDq4rXDij/MMwq6KVK/pWAYxpC7CLrkKQ= github.com/volatiletech/strmangle v0.0.6/go.mod h1:ycDvbDkjDvhC0NUU8w3fWwl5JEMTV56vTKXzR3GeR+0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/importers/imports.go b/importers/imports.go index 671fae816..54295e95a 100644 --- a/importers/imports.go +++ b/importers/imports.go @@ -201,10 +201,10 @@ func NewDefaultImports() Collection { }, ThirdParty: List{ `"github.com/friendsofgo/errors"`, - `"github.com/volatiletech/sqlboiler/v4/boil"`, - `"github.com/volatiletech/sqlboiler/v4/queries"`, - `"github.com/volatiletech/sqlboiler/v4/queries/qm"`, - `"github.com/volatiletech/sqlboiler/v4/queries/qmhelper"`, + `"github.com/twitter-payments/sqlboiler/v4/boil"`, + `"github.com/twitter-payments/sqlboiler/v4/queries"`, + `"github.com/twitter-payments/sqlboiler/v4/queries/qm"`, + `"github.com/twitter-payments/sqlboiler/v4/queries/qmhelper"`, `"github.com/volatiletech/strmangle"`, }, } @@ -215,9 +215,9 @@ func NewDefaultImports() Collection { `"regexp"`, }, ThirdParty: List{ - `"github.com/volatiletech/sqlboiler/v4/drivers"`, - `"github.com/volatiletech/sqlboiler/v4/queries"`, - `"github.com/volatiletech/sqlboiler/v4/queries/qm"`, + `"github.com/twitter-payments/sqlboiler/v4/drivers"`, + `"github.com/twitter-payments/sqlboiler/v4/queries"`, + `"github.com/twitter-payments/sqlboiler/v4/queries/qm"`, }, }, "boil_types": { @@ -226,7 +226,7 @@ func NewDefaultImports() Collection { }, ThirdParty: List{ `"github.com/friendsofgo/errors"`, - `"github.com/volatiletech/sqlboiler/v4/boil"`, + `"github.com/twitter-payments/sqlboiler/v4/boil"`, `"github.com/volatiletech/strmangle"`, }, }, @@ -239,8 +239,8 @@ func NewDefaultImports() Collection { `"testing"`, }, ThirdParty: List{ - `"github.com/volatiletech/sqlboiler/v4/boil"`, - `"github.com/volatiletech/sqlboiler/v4/queries"`, + `"github.com/twitter-payments/sqlboiler/v4/boil"`, + `"github.com/twitter-payments/sqlboiler/v4/queries"`, `"github.com/volatiletech/randomize"`, `"github.com/volatiletech/strmangle"`, }, @@ -261,7 +261,7 @@ func NewDefaultImports() Collection { }, ThirdParty: List{ `"github.com/spf13/viper"`, - `"github.com/volatiletech/sqlboiler/v4/boil"`, + `"github.com/twitter-payments/sqlboiler/v4/boil"`, }, }, "boil_queries_test": { @@ -273,7 +273,7 @@ func NewDefaultImports() Collection { `"regexp"`, }, ThirdParty: List{ - `"github.com/volatiletech/sqlboiler/v4/boil"`, + `"github.com/twitter-payments/sqlboiler/v4/boil"`, }, }, "boil_suites_test": { diff --git a/importers/imports_test.go b/importers/imports_test.go index f055df22b..d057843f7 100644 --- a/importers/imports_test.go +++ b/importers/imports_test.go @@ -175,7 +175,7 @@ func TestAddTypeImports(t *testing.T) { `"fmt"`, }, ThirdParty: List{ - `"github.com/volatiletech/sqlboiler/v4/boil"`, + `"github.com/twitter-payments/sqlboiler/v4/boil"`, }, } @@ -187,7 +187,7 @@ func TestAddTypeImports(t *testing.T) { }, ThirdParty: List{ `"github.com/volatiletech/null/v8"`, - `"github.com/volatiletech/sqlboiler/v4/boil"`, + `"github.com/twitter-payments/sqlboiler/v4/boil"`, }, } @@ -218,7 +218,7 @@ func TestAddTypeImports(t *testing.T) { }, ThirdParty: List{ `"github.com/volatiletech/null/v8"`, - `"github.com/volatiletech/sqlboiler/v4/boil"`, + `"github.com/twitter-payments/sqlboiler/v4/boil"`, }, } @@ -234,11 +234,11 @@ func TestMergeSet(t *testing.T) { a := Set{ Standard: List{"fmt"}, - ThirdParty: List{"github.com/volatiletech/sqlboiler/v4", "github.com/volatiletech/null/v8"}, + ThirdParty: List{"github.com/twitter-payments/sqlboiler/v4", "github.com/volatiletech/null/v8"}, } b := Set{ Standard: List{"os"}, - ThirdParty: List{"github.com/volatiletech/sqlboiler/v4"}, + ThirdParty: List{"github.com/twitter-payments/sqlboiler/v4"}, } c := mergeSet(a, b) @@ -246,8 +246,8 @@ func TestMergeSet(t *testing.T) { if c.Standard[0] != "fmt" && c.Standard[1] != "os" { t.Errorf("Wanted: fmt, os got: %#v", c.Standard) } - if c.ThirdParty[0] != "github.com/volatiletech/null/v8" && c.ThirdParty[1] != "github.com/volatiletech/sqlboiler/v4" { - t.Errorf("Wanted: github.com/volatiletech/sqlboiler, github.com/volatiletech/null/v8 got: %#v", c.ThirdParty) + if c.ThirdParty[0] != "github.com/volatiletech/null/v8" && c.ThirdParty[1] != "github.com/twitter-payments/sqlboiler/v4" { + t.Errorf("Wanted: github.com/twitter-payments/sqlboiler, github.com/volatiletech/null/v8 got: %#v", c.ThirdParty) } } diff --git a/main.go b/main.go index 1c96a52ec..6397af094 100644 --- a/main.go +++ b/main.go @@ -11,9 +11,9 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/volatiletech/sqlboiler/v4/boilingcore" - "github.com/volatiletech/sqlboiler/v4/drivers" - "github.com/volatiletech/sqlboiler/v4/importers" + "github.com/twitter-payments/sqlboiler/v4/boilingcore" + "github.com/twitter-payments/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/importers" ) const sqlBoilerVersion = "4.18.0" diff --git a/queries/eager_load.go b/queries/eager_load.go index d35e73ec7..221809474 100644 --- a/queries/eager_load.go +++ b/queries/eager_load.go @@ -7,7 +7,7 @@ import ( "strings" "github.com/friendsofgo/errors" - "github.com/volatiletech/sqlboiler/v4/boil" + "github.com/twitter-payments/sqlboiler/v4/boil" "github.com/volatiletech/strmangle" ) @@ -70,7 +70,7 @@ func eagerLoad(ctx context.Context, exec boil.Executor, toLoad []string, mods ma // loadRelationships dynamically calls the template generated eager load // functions of the form: // -// func (t *TableR) LoadRelationshipName(exec Executor, singular bool, obj interface{}) +// func (t *TableR) LoadRelationshipName(exec Executor, singular bool, obj interface{}) // // The arguments to this function are: // - t is not considered here, and is always passed nil. The function exists on a loaded @@ -82,11 +82,12 @@ func eagerLoad(ctx context.Context, exec boil.Executor, toLoad []string, mods ma // // We start with a normal select before eager loading anything: select * from a; // Then we start eager loading things, it can be represented by a DAG -// a1, a2 select id, a_id from b where id in (a1, a2) -// / | \ -// b1 b2 b3 select id, b_id from c where id in (b2, b3, b4) -// / | \ \ -// c1 c2 c3 c4 +// +// a1, a2 select id, a_id from b where id in (a1, a2) +// / | \ +// b1 b2 b3 select id, b_id from c where id in (b2, b3, b4) +// / | \ \ +// c1 c2 c3 c4 // // That's to say that we descend the graph of relationships, and at each level // we gather all the things up we want to load into, load them, and then move @@ -236,9 +237,9 @@ func (l loadRelationshipState) loadRelationshipsRecurse(depth int, obj reflect.V // // For example when loadingFrom is [parent1, parent2] // -// parent1 -> child1 -// \-> child2 -// parent2 -> child3 +// parent1 -> child1 +// \-> child2 +// parent2 -> child3 // // This should return [child1, child2, child3] func collectLoaded(key string, loadingFrom reflect.Value) (reflect.Value, bindKind, error) { diff --git a/queries/eager_load_test.go b/queries/eager_load_test.go index c887e55a9..d6eb00211 100644 --- a/queries/eager_load_test.go +++ b/queries/eager_load_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/volatiletech/sqlboiler/v4/boil" + "github.com/twitter-payments/sqlboiler/v4/boil" ) var testEagerCounters struct { diff --git a/queries/qm/query_mods.go b/queries/qm/query_mods.go index e8bf752eb..3e1e1058d 100644 --- a/queries/qm/query_mods.go +++ b/queries/qm/query_mods.go @@ -3,8 +3,8 @@ package qm import ( "strings" - "github.com/volatiletech/sqlboiler/v4/queries" - "github.com/volatiletech/sqlboiler/v4/queries/qmhelper" + "github.com/twitter-payments/sqlboiler/v4/queries" + "github.com/twitter-payments/sqlboiler/v4/queries/qmhelper" ) // QueryMod modifies a query object. @@ -83,21 +83,21 @@ func (qm loadQueryMod) Apply(q *queries.Query) { // In the following example we see how to eager load a users's videos // and the video's tags comments, and publisher during a query to find users. // -// models.Users(qm.Load("Videos.Tags")) +// models.Users(qm.Load("Videos.Tags")) // // In order to filter better on the query for the relationships you can additionally // supply query mods. // -// models.Users(qm.Load("Videos.Tags", Where("deleted = ?", isDeleted))) +// models.Users(qm.Load("Videos.Tags", Where("deleted = ?", isDeleted))) // // Keep in mind the above only sets the query mods for the query on the last specified // relationship. In this case, only Tags will get the query mod. If you want to do // intermediate relationships with query mods you must specify them separately: // -// models.Users( -// qm.Load("Videos", Where("deleted = false")) -// qm.Load("Videos.Tags", Where("deleted = ?", isDeleted)) -// ) +// models.Users( +// qm.Load("Videos", Where("deleted = false")) +// qm.Load("Videos.Tags", Where("deleted = ?", isDeleted)) +// ) func Load(relationship string, mods ...QueryMod) QueryMod { return loadQueryMod{ relationship: relationship, diff --git a/queries/qmhelper/qmhelper.go b/queries/qmhelper/qmhelper.go index ed9bdf019..e4e7a39aa 100644 --- a/queries/qmhelper/qmhelper.go +++ b/queries/qmhelper/qmhelper.go @@ -4,7 +4,7 @@ import ( "fmt" "reflect" - "github.com/volatiletech/sqlboiler/v4/queries" + "github.com/twitter-payments/sqlboiler/v4/queries" ) // Nullable object diff --git a/queries/query.go b/queries/query.go index ea8052ec8..b918eaaa7 100644 --- a/queries/query.go +++ b/queries/query.go @@ -6,8 +6,8 @@ import ( "fmt" "regexp" - "github.com/volatiletech/sqlboiler/v4/boil" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/boil" + "github.com/twitter-payments/sqlboiler/v4/drivers" ) // joinKind is the type of join diff --git a/queries/query_builders_test.go b/queries/query_builders_test.go index ed21a68a9..58fe1d9ef 100644 --- a/queries/query_builders_test.go +++ b/queries/query_builders_test.go @@ -11,7 +11,7 @@ import ( "testing" "github.com/davecgh/go-spew/spew" - "github.com/volatiletech/sqlboiler/v4/drivers" + "github.com/twitter-payments/sqlboiler/v4/drivers" ) var writeGoldenFiles = flag.Bool( diff --git a/queries/reflect.go b/queries/reflect.go index 3836325e8..ec28f4abc 100644 --- a/queries/reflect.go +++ b/queries/reflect.go @@ -14,7 +14,7 @@ import ( "unicode" "github.com/friendsofgo/errors" - "github.com/volatiletech/sqlboiler/v4/boil" + "github.com/twitter-payments/sqlboiler/v4/boil" "github.com/volatiletech/strmangle" ) diff --git a/queries/reflect_test.go b/queries/reflect_test.go index 9e6e82adc..0f1beaece 100644 --- a/queries/reflect_test.go +++ b/queries/reflect_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" + "github.com/twitter-payments/sqlboiler/v4/drivers" "github.com/volatiletech/null/v8" - "github.com/volatiletech/sqlboiler/v4/drivers" "github.com/DATA-DOG/go-sqlmock" ) diff --git a/types/decimal_test.go b/types/decimal_test.go index 2d5dd51d8..77485a619 100644 --- a/types/decimal_test.go +++ b/types/decimal_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/ericlagergren/decimal" - "github.com/volatiletech/sqlboiler/v4/queries/qmhelper" + "github.com/twitter-payments/sqlboiler/v4/queries/qmhelper" ) func TestDecimal_Value(t *testing.T) {