Bulk replace project references in go code
This commit is contained in:
parent
814ebddfa2
commit
4474319e73
170 changed files with 488 additions and 488 deletions
|
|
@ -13,18 +13,18 @@ import (
|
|||
_ "github.com/lib/pq"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
mysqlgen "github.com/go-jet/jet/v2/generator/mysql"
|
||||
postgresgen "github.com/go-jet/jet/v2/generator/postgres"
|
||||
sqlitegen "github.com/go-jet/jet/v2/generator/sqlite"
|
||||
"github.com/go-jet/jet/v2/generator/template"
|
||||
"github.com/go-jet/jet/v2/internal/3rdparty/snaker"
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/go-jet/jet/v2/internal/utils/errfmt"
|
||||
"github.com/go-jet/jet/v2/internal/utils/strslice"
|
||||
"github.com/go-jet/jet/v2/mysql"
|
||||
postgres2 "github.com/go-jet/jet/v2/postgres"
|
||||
"github.com/go-jet/jet/v2/sqlite"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
mysqlgen "github.com/Gleipnir-Technology/jet/generator/mysql"
|
||||
postgresgen "github.com/Gleipnir-Technology/jet/generator/postgres"
|
||||
sqlitegen "github.com/Gleipnir-Technology/jet/generator/sqlite"
|
||||
"github.com/Gleipnir-Technology/jet/generator/template"
|
||||
"github.com/Gleipnir-Technology/jet/internal/3rdparty/snaker"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/errfmt"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/strslice"
|
||||
"github.com/Gleipnir-Technology/jet/mysql"
|
||||
postgres2 "github.com/Gleipnir-Technology/jet/postgres"
|
||||
"github.com/Gleipnir-Technology/jet/sqlite"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
|||
6
doc.go
6
doc.go
|
|
@ -7,12 +7,12 @@ Jet currently supports PostgreSQL, MySQL, MariaDB and SQLite. Future releases wi
|
|||
|
||||
Use the command bellow to add jet as a dependency into go.mod project:
|
||||
|
||||
$ go get -u github.com/go-jet/jet/v2
|
||||
$ go get -u github.com/Gleipnir-Technology/jet
|
||||
|
||||
Jet generator can be installed in one of the following ways:
|
||||
|
||||
1. (Go1.16+) Install jet generator using go install:
|
||||
go install github.com/go-jet/jet/v2/cmd/jet@latest
|
||||
go install github.com/Gleipnir-Technology/jet/cmd/jet@latest
|
||||
|
||||
2. Install jet generator to GOPATH/bin folder:
|
||||
cd $GOPATH/src/ && GO111MODULE=off go get -u github.com/go-jet/jet/cmd/jet
|
||||
|
|
@ -38,7 +38,7 @@ Before we can write SQL queries in Go, we need to import generated SQL builder a
|
|||
|
||||
To write postgres SQL queries we import:
|
||||
|
||||
. "github.com/go-jet/jet/v2/postgres" // Dot import is used so that Go code resemble as much as native SQL. It is not mandatory.
|
||||
. "github.com/Gleipnir-Technology/jet/postgres" // Dot import is used so that Go code resemble as much as native SQL. It is not mandatory.
|
||||
|
||||
Then we can write the SQL query:
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
package enum
|
||||
|
||||
import "github.com/go-jet/jet/v2/postgres"
|
||||
import "github.com/Gleipnir-Technology/jet/postgres"
|
||||
|
||||
var MpaaRating = &struct {
|
||||
G postgres.StringExpression
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
package table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
"github.com/Gleipnir-Technology/jet/postgres"
|
||||
)
|
||||
|
||||
var Actor = newActorTable("dvds", "actor", "")
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
package table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
"github.com/Gleipnir-Technology/jet/postgres"
|
||||
)
|
||||
|
||||
var Category = newCategoryTable("dvds", "category", "")
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
package table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
"github.com/Gleipnir-Technology/jet/postgres"
|
||||
)
|
||||
|
||||
var Film = newFilmTable("dvds", "film", "")
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
package table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
"github.com/Gleipnir-Technology/jet/postgres"
|
||||
)
|
||||
|
||||
var FilmActor = newFilmActorTable("dvds", "film_actor", "")
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
package table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
"github.com/Gleipnir-Technology/jet/postgres"
|
||||
)
|
||||
|
||||
var FilmCategory = newFilmCategoryTable("dvds", "film_category", "")
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
package table
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
"github.com/Gleipnir-Technology/jet/postgres"
|
||||
)
|
||||
|
||||
var Language = newLanguageTable("dvds", "language", "")
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
package view
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
"github.com/Gleipnir-Technology/jet/postgres"
|
||||
)
|
||||
|
||||
var ActorInfo = newActorInfoTable("dvds", "actor_info", "")
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
package view
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
"github.com/Gleipnir-Technology/jet/postgres"
|
||||
)
|
||||
|
||||
var CustomerList = newCustomerListTable("dvds", "customer_list", "")
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ import (
|
|||
|
||||
// dot import so that jet go code would resemble as much as native SQL
|
||||
// dot import is not mandatory
|
||||
. "github.com/go-jet/jet/v2/examples/quick-start/.gen/jetdb/dvds/table"
|
||||
. "github.com/go-jet/jet/v2/postgres"
|
||||
. "github.com/Gleipnir-Technology/jet/examples/quick-start/.gen/jetdb/dvds/table"
|
||||
. "github.com/Gleipnir-Technology/jet/postgres"
|
||||
|
||||
"github.com/go-jet/jet/v2/examples/quick-start/.gen/jetdb/dvds/enum"
|
||||
"github.com/go-jet/jet/v2/examples/quick-start/.gen/jetdb/dvds/model"
|
||||
"github.com/Gleipnir-Technology/jet/examples/quick-start/.gen/jetdb/dvds/enum"
|
||||
"github.com/Gleipnir-Technology/jet/examples/quick-start/.gen/jetdb/dvds/model"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/go-jet/jet/v2/generator/template"
|
||||
"github.com/go-jet/jet/v2/mysql"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
"github.com/Gleipnir-Technology/jet/generator/template"
|
||||
"github.com/Gleipnir-Technology/jet/mysql"
|
||||
mysqldr "github.com/go-sql-driver/mysql"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/go-jet/jet/v2/qrm"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
"github.com/Gleipnir-Technology/jet/qrm"
|
||||
)
|
||||
|
||||
// mySqlQuerySet is dialect query set for MySQL
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import (
|
|||
"path/filepath"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/go-jet/jet/v2/generator/template"
|
||||
"github.com/go-jet/jet/v2/postgres"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
"github.com/Gleipnir-Technology/jet/generator/template"
|
||||
"github.com/Gleipnir-Technology/jet/postgres"
|
||||
)
|
||||
|
||||
// DBConnection contains postgres connection details
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import (
|
|||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/go-jet/jet/v2/qrm"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
"github.com/Gleipnir-Technology/jet/qrm"
|
||||
)
|
||||
|
||||
// postgresQuerySet is dialect query set for PostgreSQL
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/go-jet/jet/v2/internal/utils/semantic"
|
||||
"github.com/go-jet/jet/v2/qrm"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/semantic"
|
||||
"github.com/Gleipnir-Technology/jet/qrm"
|
||||
)
|
||||
|
||||
// sqliteQuerySet is dialect query set for SQLite
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ import (
|
|||
"database/sql"
|
||||
"fmt"
|
||||
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/go-jet/jet/v2/generator/template"
|
||||
"github.com/go-jet/jet/v2/sqlite"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
"github.com/Gleipnir-Technology/jet/generator/template"
|
||||
"github.com/Gleipnir-Technology/jet/sqlite"
|
||||
)
|
||||
|
||||
// GenerateDSN generates jet files using dsn connection string
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ type {{$modelTableTemplate.TypeName}} struct {
|
|||
|
||||
var enumSQLBuilderTemplate = `package {{package}}
|
||||
|
||||
import "github.com/go-jet/jet/v2/{{dialect.PackageName}}"
|
||||
import "github.com/Gleipnir-Technology/jet/{{dialect.PackageName}}"
|
||||
|
||||
{{golangComment .Comment}}
|
||||
var {{enumTemplate.InstanceName}} = &struct {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package template
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// Template is generator template used for file generation
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import (
|
|||
"github.com/google/uuid"
|
||||
"github.com/jackc/pgtype"
|
||||
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/go-jet/jet/v2/internal/utils/dbidentifier"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/dbidentifier"
|
||||
)
|
||||
|
||||
// Model is template for model files generation
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package template
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import (
|
|||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/utils/filesys"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/filesys"
|
||||
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
type Dialect = jet.Dialect
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@ import (
|
|||
"strings"
|
||||
"unicode"
|
||||
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/go-jet/jet/v2/internal/utils/dbidentifier"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/dbidentifier"
|
||||
)
|
||||
|
||||
// SQLBuilder is template for generating sql builder files
|
||||
|
|
@ -162,7 +162,7 @@ func renameIfReserved(name string) string {
|
|||
func DefaultTableSQLBuilderColumn(dialect jet.Dialect, columnMetaData metadata.Column) TableSQLBuilderColumn {
|
||||
package_name := dialect.PackageName()
|
||||
return TableSQLBuilderColumn{
|
||||
Import: "github.com/go-jet/jet/v2/" + package_name,
|
||||
Import: "github.com/Gleipnir-Technology/jet/" + package_name,
|
||||
Name: renameIfReserved(dbidentifier.ToGoIdentifier(columnMetaData.Name)),
|
||||
PackageName: package_name,
|
||||
Type: "Column" + getSqlBuilderColumnType(columnMetaData),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package template
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/generator/metadata"
|
||||
"github.com/Gleipnir-Technology/jet/generator/metadata"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
)
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,4 +1,4 @@
|
|||
module github.com/go-jet/jet/v2
|
||||
module github.com/Gleipnir-Technology/jet
|
||||
|
||||
go 1.24.0
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package jet
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/utils/is"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/utils/is"
|
||||
|
||||
// Clause interface
|
||||
type Clause interface {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package jet
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/3rdparty/snaker"
|
||||
"github.com/Gleipnir-Technology/jet/internal/3rdparty/snaker"
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -81,14 +81,14 @@ func (c *ColumnExpressionGeometryImpl) serialize(statement StatementType, out *S
|
|||
out.WriteIdentifier(c.defaultAlias())
|
||||
out.WriteString(")")
|
||||
} else {
|
||||
out.WriteString("ST_AsGeoJSON(")
|
||||
//out.WriteString("ST_AsGeoJSON(")
|
||||
if c.tableName != "" && !contains(options, ShortName) {
|
||||
out.WriteIdentifier(c.tableName)
|
||||
out.WriteByte('.')
|
||||
}
|
||||
|
||||
out.WriteIdentifier(c.name)
|
||||
out.WriteString(")")
|
||||
//out.WriteString(")")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
package jet
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/3rdparty/snaker"
|
||||
"github.com/Gleipnir-Technology/jet/internal/3rdparty/snaker"
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ func (q QueryInfo) Caller() (file string, line int, function string) {
|
|||
}
|
||||
|
||||
funcDetails := runtime.FuncForPC(pc)
|
||||
if !strings.Contains(funcDetails.Name(), "github.com/go-jet/jet/v2/internal") {
|
||||
if !strings.Contains(funcDetails.Name(), "github.com/Gleipnir-Technology/jet/internal") {
|
||||
function = funcDetails.Name()
|
||||
return
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"bytes"
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
"github.com/go-jet/jet/v2/internal/3rdparty/pq"
|
||||
"github.com/go-jet/jet/v2/internal/utils/is"
|
||||
"github.com/Gleipnir-Technology/jet/internal/3rdparty/pq"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/is"
|
||||
"github.com/google/uuid"
|
||||
"reflect"
|
||||
"sort"
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package jet
|
|||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"github.com/go-jet/jet/v2/qrm"
|
||||
"github.com/Gleipnir-Technology/jet/qrm"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package jet
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/utils/is"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/utils/is"
|
||||
|
||||
// SerializerTable interface
|
||||
type SerializerTable interface {
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import (
|
|||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/utils/dbidentifier"
|
||||
"github.com/go-jet/jet/v2/internal/utils/must"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/dbidentifier"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/must"
|
||||
)
|
||||
|
||||
// SerializeClauseList func
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ import (
|
|||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/go-jet/jet/v2/internal/utils/throw"
|
||||
"github.com/go-jet/jet/v2/qrm"
|
||||
"github.com/go-jet/jet/v2/stmtcache"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/throw"
|
||||
"github.com/Gleipnir-Technology/jet/qrm"
|
||||
"github.com/Gleipnir-Technology/jet/stmtcache"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package testutils
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/utils/throw"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/throw"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package datetime
|
||||
|
||||
import (
|
||||
//"github.com/go-jet/jet/v2/internal/utils/min"
|
||||
//"github.com/Gleipnir-Technology/jet/internal/utils/min"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package dbidentifier
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/3rdparty/snaker"
|
||||
"github.com/Gleipnir-Technology/jet/internal/3rdparty/snaker"
|
||||
"strings"
|
||||
"unicode"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package errfmt
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/utils/is"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/is"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package must
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/utils/is"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/is"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mysql
|
|||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// CAST function converts an expr (of any type) into later specified datatype.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// Column is common column interface for all types of columns.
|
||||
type Column = jet.ColumnExpression
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// DeleteStatement is interface for MySQL DELETE statement
|
||||
type DeleteStatement interface {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"encoding/hex"
|
||||
"fmt"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// Dialect is implementation of MySQL dialect for SQL Builder serialization.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// Expression is common interface for all expressions.
|
||||
// Can be Bool, Int, Float, String, Date, Time or Timestamp expressions.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// This functions can be used, instead of its method counterparts, to have a better indentation of a complex condition
|
||||
// in the Go code and in the generated SQL.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// InsertStatement is interface for SQL INSERT statements
|
||||
type InsertStatement interface {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ import (
|
|||
"regexp"
|
||||
"time"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/utils/datetime"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/datetime"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
type unitType string
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// LATERAL derived tables constructor from select statement
|
||||
func LATERAL(selectStmt SelectStatement) lateralImpl {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mysql
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// Keywords
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// LockStatement is interface for MySQL LOCK tables
|
||||
type LockStatement interface {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// NOT returns negation of bool expression result
|
||||
var NOT = jet.NOT
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package mysql
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// OptimizerHint provides a way to optimize query execution per-statement basis
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mysql
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// SelectJsonStatement is an interface for MySQL statements that generate JSON on the server.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mysql
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// RowLock is interface for SELECT statement row lock types
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mysql
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/testutils"
|
||||
"github.com/Gleipnir-Technology/jet/internal/testutils"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// SelectTable is interface for MySQL sub-queries
|
||||
type SelectTable interface {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// UNION effectively appends the result of sub-queries(select statements) into single query.
|
||||
// It eliminates duplicate rows from its result.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mysql
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// RawStatement creates new sql statements from raw query and optional map of named arguments
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// Table is interface for MySQL tables
|
||||
type Table interface {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// Statement is common interface for all statements(SELECT, INSERT, UPDATE, DELETE, LOCK)
|
||||
type Statement = jet.Statement
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// UpdateStatement is interface of SQL UPDATE statement
|
||||
type UpdateStatement interface {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package mysql
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/go-jet/jet/v2/internal/testutils"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/testutils"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
type values struct {
|
||||
jet.Values
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mysql
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// CommonTableExpression defines set of interface methods for postgres CTEs
|
||||
type CommonTableExpression interface {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// Interfaces for different postgres array column types
|
||||
type (
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// CAST function converts an expr (of any type) into later specified datatype.
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package postgres
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/go-jet/jet/v2/internal/utils/is"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/is"
|
||||
)
|
||||
|
||||
type onConflict interface {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package postgres
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// Column is common column interface for all types of columns.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
type conflictAction interface {
|
||||
jet.Serializer
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// DeleteStatement is interface for PostgreSQL DELETE statement
|
||||
type DeleteStatement interface {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// Dialect is implementation of postgres dialect for SQL Builder serialisation.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// Expression is a common interface for all expressions.
|
||||
// Can be Bool, Int, Float, String, Date, Time, Timez, Timestamp or Timestampz expressions.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package postgres
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// This functions can be used, instead of its method counterparts, to have a better indentation of a complex condition
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// InsertStatement is interface for SQL INSERT statements
|
||||
type InsertStatement interface {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/go-jet/jet/v2/internal/utils/datetime"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/datetime"
|
||||
)
|
||||
|
||||
type quantityAndUnit = float64
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
const (
|
||||
// DEFAULT is jet equivalent of SQL DEFAULT
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// LATERAL derived tables constructor from select statement
|
||||
func LATERAL(selectStmt SelectStatement) lateralImpl {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
"github.com/lib/pq"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// Bool is boolean literal constructor
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// TableLockMode is a type of possible SQL table lock
|
||||
type TableLockMode string
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// NOT returns negation of bool expression result
|
||||
var NOT = jet.NOT
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package postgres
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package postgres
|
|||
import (
|
||||
"math"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// RowLock is interface for SELECT statement row lock types
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// SelectTable is interface for postgres temporary tables like sub-queries, VALUES, CTEs etc...
|
||||
type SelectTable interface {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// UNION effectively appends the result of sub-queries(select statements) into single query.
|
||||
// It eliminates duplicate rows from its result.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package postgres
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// RawStatement creates new sql statements from raw query and optional map of named arguments
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// Table is interface for MySQL tables
|
||||
type Table interface {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// Statement is common interface for all statements(SELECT, INSERT, UPDATE, DELETE, LOCK)
|
||||
type Statement = jet.Statement
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package postgres
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// UpdateStatement is interface of SQL UPDATE statement
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package postgres
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/go-jet/jet/v2/internal/testutils"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/testutils"
|
||||
)
|
||||
|
||||
var table1Col1 = IntegerColumn("col1")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
type values struct {
|
||||
jet.Values
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package postgres
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// CommonTableExpression defines set of interface methods for postgres CTEs
|
||||
type CommonTableExpression interface {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql"
|
||||
"database/sql/driver"
|
||||
"fmt"
|
||||
"github.com/go-jet/jet/v2/internal/utils/datetime"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/datetime"
|
||||
"reflect"
|
||||
"strconv"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import (
|
|||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/utils/must"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/must"
|
||||
)
|
||||
|
||||
// Config holds the configuration settings for QRM scanning behavior.
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-jet/jet/v2/internal/utils/must"
|
||||
"github.com/go-jet/jet/v2/internal/utils/strslice"
|
||||
"github.com/go-jet/jet/v2/qrm/internal"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/must"
|
||||
"github.com/Gleipnir-Technology/jet/internal/utils/strslice"
|
||||
"github.com/Gleipnir-Technology/jet/qrm/internal"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package sqlite
|
||||
|
||||
import (
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// CAST function converts an expr (of any type) into later specified datatype.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package sqlite
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// Column is common column interface for all types of columns.
|
||||
type Column = jet.ColumnExpression
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package sqlite
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// DeleteStatement is interface for MySQL DELETE statement
|
||||
type DeleteStatement interface {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package sqlite
|
|||
import (
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
"github.com/go-jet/jet/v2/internal/jet"
|
||||
"github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
)
|
||||
|
||||
// Dialect is implementation of SQL Builder for SQLite databases.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package sqlite
|
||||
|
||||
import "github.com/go-jet/jet/v2/internal/jet"
|
||||
import "github.com/Gleipnir-Technology/jet/internal/jet"
|
||||
|
||||
// Expression is common interface for all expressions.
|
||||
// Can be Bool, Int, Float, String, Date, Time or Timestamp expressions.
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue