Update repo to add vattle org paths
This commit is contained in:
parent
2ece7d14f6
commit
33286e648a
16 changed files with 42 additions and 41 deletions
|
@ -1,9 +1,9 @@
|
|||
# SQLBoiler
|
||||
|
||||
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nullbio/sqlboiler/blob/master/LICENSE.md)
|
||||
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/vattle/sqlboiler/blob/master/LICENSE.md)
|
||||
[![GoDoc](https://godoc.org/github.com/pobri19/sqlboiler?status.svg)](https://godoc.org/github.com/pobri19/sqlboiler)
|
||||
[![CircleCI](https://circleci.com/gh/nullbio/sqlboiler.svg?style=shield)](https://circleci.com/gh/nullbio/sqlboiler)
|
||||
[![Go Report Card](https://goreportcard.com/badge/kubernetes/helm)](http://goreportcard.com/report/nullbio/sqlboiler)
|
||||
[![CircleCI](https://circleci.com/gh/vattle/sqlboiler.svg?style=shield)](https://circleci.com/gh/vattle/sqlboiler)
|
||||
[![Go Report Card](https://goreportcard.com/badge/kubernetes/helm)](http://goreportcard.com/report/vattle/sqlboiler)
|
||||
|
||||
SQLBoiler is a tool to generate a Go ORM tailored to your database schema.
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/nullbio/sqlboiler/strmangle"
|
||||
"github.com/vattle/sqlboiler/strmangle"
|
||||
)
|
||||
|
||||
// Column holds information about a database column.
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
// Side-effect import sql driver
|
||||
_ "github.com/lib/pq"
|
||||
"github.com/nullbio/sqlboiler/bdb"
|
||||
"github.com/vattle/sqlboiler/bdb"
|
||||
)
|
||||
|
||||
// PostgresDriver holds the database connection string and a handle
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"fmt"
|
||||
"reflect"
|
||||
|
||||
"github.com/nullbio/sqlboiler/strmangle"
|
||||
"github.com/vattle/sqlboiler/strmangle"
|
||||
)
|
||||
|
||||
// SetComplement subtracts the elements in b from a
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package qm
|
||||
|
||||
import "github.com/nullbio/sqlboiler/boil"
|
||||
import "github.com/vattle/sqlboiler/boil"
|
||||
|
||||
// QueryMod to modify the query object
|
||||
type QueryMod func(q *boil.Query)
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/nullbio/sqlboiler/strmangle"
|
||||
"github.com/vattle/sqlboiler/strmangle"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/nullbio/sqlboiler/strmangle"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/vattle/sqlboiler/strmangle"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -9,9 +9,10 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/nullbio/sqlboiler/strmangle"
|
||||
null "gopkg.in/nullbio/null.v4"
|
||||
|
||||
"github.com/satori/go.uuid"
|
||||
"gopkg.in/nullbio/null.v4"
|
||||
"github.com/vattle/sqlboiler/strmangle"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
24
imports.go
24
imports.go
|
@ -6,7 +6,7 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/nullbio/sqlboiler/bdb"
|
||||
"github.com/vattle/sqlboiler/bdb"
|
||||
)
|
||||
|
||||
// imports defines the optional standard imports and
|
||||
|
@ -148,9 +148,9 @@ var defaultTemplateImports = imports{
|
|||
`"strings"`,
|
||||
},
|
||||
thirdParty: importList{
|
||||
`"github.com/nullbio/sqlboiler/boil"`,
|
||||
`"github.com/nullbio/sqlboiler/boil/qm"`,
|
||||
`"github.com/nullbio/sqlboiler/strmangle"`,
|
||||
`"github.com/vattle/sqlboiler/boil"`,
|
||||
`"github.com/vattle/sqlboiler/boil/qm"`,
|
||||
`"github.com/vattle/sqlboiler/strmangle"`,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -158,8 +158,8 @@ var defaultSingletonTemplateImports = map[string]imports{
|
|||
"boil_helpers": {
|
||||
standard: importList{},
|
||||
thirdParty: importList{
|
||||
`"github.com/nullbio/sqlboiler/boil"`,
|
||||
`"github.com/nullbio/sqlboiler/boil/qm"`,
|
||||
`"github.com/vattle/sqlboiler/boil"`,
|
||||
`"github.com/vattle/sqlboiler/boil/qm"`,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -172,9 +172,9 @@ var defaultTestTemplateImports = imports{
|
|||
},
|
||||
thirdParty: importList{
|
||||
`"gopkg.in/nullbio/null.v4"`,
|
||||
`"github.com/nullbio/sqlboiler/boil"`,
|
||||
`"github.com/nullbio/sqlboiler/boil/qm"`,
|
||||
`"github.com/nullbio/sqlboiler/strmangle"`,
|
||||
`"github.com/vattle/sqlboiler/boil"`,
|
||||
`"github.com/vattle/sqlboiler/boil/qm"`,
|
||||
`"github.com/vattle/sqlboiler/strmangle"`,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ var defaultSingletonTestTemplateImports = map[string]imports{
|
|||
`"bytes"`,
|
||||
},
|
||||
thirdParty: importList{
|
||||
`"github.com/nullbio/sqlboiler/boil"`,
|
||||
`"github.com/vattle/sqlboiler/boil"`,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
@ -220,8 +220,8 @@ var defaultTestMainImports = map[string]imports{
|
|||
`"math/rand"`,
|
||||
},
|
||||
thirdParty: importList{
|
||||
`"github.com/nullbio/sqlboiler/boil"`,
|
||||
`"github.com/nullbio/sqlboiler/bdb/drivers"`,
|
||||
`"github.com/vattle/sqlboiler/boil"`,
|
||||
`"github.com/vattle/sqlboiler/bdb/drivers"`,
|
||||
`_ "github.com/lib/pq"`,
|
||||
`"github.com/spf13/viper"`,
|
||||
`"github.com/kat-co/vala"`,
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/nullbio/sqlboiler/bdb"
|
||||
"github.com/vattle/sqlboiler/bdb"
|
||||
)
|
||||
|
||||
func TestImportsSort(t *testing.T) {
|
||||
|
@ -61,7 +61,7 @@ func TestCombineTypeImports(t *testing.T) {
|
|||
`"fmt"`,
|
||||
},
|
||||
thirdParty: importList{
|
||||
`"github.com/nullbio/sqlboiler/boil"`,
|
||||
`"github.com/vattle/sqlboiler/boil"`,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ func TestCombineTypeImports(t *testing.T) {
|
|||
`"time"`,
|
||||
},
|
||||
thirdParty: importList{
|
||||
`"github.com/nullbio/sqlboiler/boil"`,
|
||||
`"github.com/vattle/sqlboiler/boil"`,
|
||||
`"gopkg.in/nullbio/null.v4"`,
|
||||
},
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ func TestCombineTypeImports(t *testing.T) {
|
|||
`"time"`,
|
||||
},
|
||||
thirdParty: importList{
|
||||
`"github.com/nullbio/sqlboiler/boil"`,
|
||||
`"github.com/vattle/sqlboiler/boil"`,
|
||||
`"gopkg.in/nullbio/null.v4"`,
|
||||
},
|
||||
}
|
||||
|
@ -122,11 +122,11 @@ func TestCombineImports(t *testing.T) {
|
|||
|
||||
a := imports{
|
||||
standard: importList{"fmt"},
|
||||
thirdParty: importList{"github.com/nullbio/sqlboiler", "gopkg.in/nullbio/null.v4"},
|
||||
thirdParty: importList{"github.com/vattle/sqlboiler", "gopkg.in/nullbio/null.v4"},
|
||||
}
|
||||
b := imports{
|
||||
standard: importList{"os"},
|
||||
thirdParty: importList{"github.com/nullbio/sqlboiler"},
|
||||
thirdParty: importList{"github.com/vattle/sqlboiler"},
|
||||
}
|
||||
|
||||
c := combineImports(a, b)
|
||||
|
@ -134,8 +134,8 @@ func TestCombineImports(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/nullbio/sqlboiler" && c.thirdParty[1] != "gopkg.in/nullbio/null.v4" {
|
||||
t.Errorf("Wanted: github.com/nullbio/sqlboiler, gopkg.in/nullbio/null.v4 got: %#v", c.thirdParty)
|
||||
if c.thirdParty[0] != "github.com/vattle/sqlboiler" && c.thirdParty[1] != "gopkg.in/nullbio/null.v4" {
|
||||
t.Errorf("Wanted: github.com/vattle/sqlboiler, gopkg.in/nullbio/null.v4 got: %#v", c.thirdParty)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
2
main.go
2
main.go
|
@ -50,7 +50,7 @@ func main() {
|
|||
Use: "sqlboiler [flags] <driver>",
|
||||
Short: "SQL Boiler generates boilerplate structs and statements",
|
||||
Long: "SQL Boiler generates boilerplate structs and statements from template files.\n" +
|
||||
`Complete documentation is available at http://github.com/nullbio/sqlboiler`,
|
||||
`Complete documentation is available at http://github.com/vattle/sqlboiler`,
|
||||
Example: `sqlboiler -o models -p models postgres`,
|
||||
PreRunE: preRun,
|
||||
RunE: run,
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/nullbio/sqlboiler/bdb"
|
||||
"github.com/nullbio/sqlboiler/bdb/drivers"
|
||||
"github.com/vattle/sqlboiler/bdb"
|
||||
"github.com/vattle/sqlboiler/bdb/drivers"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/nullbio/sqlboiler/bdb"
|
||||
"github.com/vattle/sqlboiler/bdb"
|
||||
)
|
||||
|
||||
var state *State
|
||||
|
|
|
@ -8,8 +8,8 @@ import (
|
|||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/nullbio/sqlboiler/bdb"
|
||||
"github.com/nullbio/sqlboiler/strmangle"
|
||||
"github.com/vattle/sqlboiler/bdb"
|
||||
"github.com/vattle/sqlboiler/strmangle"
|
||||
)
|
||||
|
||||
// templateData for sqlboiler templates
|
||||
|
|
|
@ -4,8 +4,8 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/nullbio/sqlboiler/bdb"
|
||||
"github.com/nullbio/sqlboiler/strmangle"
|
||||
"github.com/vattle/sqlboiler/bdb"
|
||||
"github.com/vattle/sqlboiler/strmangle"
|
||||
)
|
||||
|
||||
// RelationshipToOneTexts contains text that will be used by templates.
|
||||
|
|
|
@ -5,8 +5,8 @@ import (
|
|||
"testing"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/nullbio/sqlboiler/bdb"
|
||||
"github.com/nullbio/sqlboiler/strmangle"
|
||||
"github.com/vattle/sqlboiler/bdb"
|
||||
"github.com/vattle/sqlboiler/strmangle"
|
||||
)
|
||||
|
||||
type fakeDB int
|
||||
|
|
Loading…
Reference in a new issue