Repath
This commit is contained in:
parent
c5537355c7
commit
88867e2416
14
.github/ISSUE_TEMPLATE.md
vendored
14
.github/ISSUE_TEMPLATE.md
vendored
@ -1,4 +1,4 @@
|
|||||||
Your issue may already be reported! Please search on the [issue track](https://github.com/jinzhu/gorm/issues) before creating one.
|
Your issue may already be reported! Please search on the [issue track](https://github.com/charm-jp/gorm/issues) before creating one.
|
||||||
|
|
||||||
### What version of Go are you using (`go version`)?
|
### What version of Go are you using (`go version`)?
|
||||||
|
|
||||||
@ -8,17 +8,17 @@ Your issue may already be reported! Please search on the [issue track](https://g
|
|||||||
|
|
||||||
### Please provide a complete runnable program to reproduce your issue. **IMPORTANT**
|
### Please provide a complete runnable program to reproduce your issue. **IMPORTANT**
|
||||||
|
|
||||||
Need to runnable with [GORM's docker compose config](https://github.com/jinzhu/gorm/blob/master/docker-compose.yml) or please provides your config.
|
Need to runnable with [GORM's docker compose config](https://github.com/charm-jp/gorm/blob/master/docker-compose.yml) or please provides your config.
|
||||||
|
|
||||||
```go
|
```go
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
_ "github.com/jinzhu/gorm/dialects/mssql"
|
_ "github.com/charm-jp/gorm/dialects/mssql"
|
||||||
_ "github.com/jinzhu/gorm/dialects/mysql"
|
_ "github.com/charm-jp/gorm/dialects/mysql"
|
||||||
_ "github.com/jinzhu/gorm/dialects/postgres"
|
_ "github.com/charm-jp/gorm/dialects/postgres"
|
||||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
_ "github.com/charm-jp/gorm/dialects/sqlite"
|
||||||
)
|
)
|
||||||
|
|
||||||
var db *gorm.DB
|
var db *gorm.DB
|
||||||
|
9
.idea/gorm.iml
generated
Normal file
9
.idea/gorm.iml
generated
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="Go" enabled="true" />
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
6
.idea/misc.xml
generated
Normal file
6
.idea/misc.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="JavaScriptSettings">
|
||||||
|
<option name="languageLevel" value="ES6" />
|
||||||
|
</component>
|
||||||
|
</project>
|
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/gorm.iml" filepath="$PROJECT_DIR$/.idea/gorm.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
The fantastic ORM library for Golang, aims to be developer friendly.
|
The fantastic ORM library for Golang, aims to be developer friendly.
|
||||||
|
|
||||||
[](https://goreportcard.com/report/github.com/jinzhu/gorm)
|
[](https://goreportcard.com/report/github.com/charm-jp/gorm)
|
||||||
[](https://app.wercker.com/project/byKey/8596cace912c9947dd9c8542ecc8cb8b)
|
[](https://app.wercker.com/project/byKey/8596cace912c9947dd9c8542ecc8cb8b)
|
||||||
[](https://codecov.io/gh/jinzhu/gorm)
|
[](https://codecov.io/gh/jinzhu/gorm)
|
||||||
[](https://gitter.im/jinzhu/gorm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/jinzhu/gorm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
[](https://opencollective.com/gorm)
|
[](https://opencollective.com/gorm)
|
||||||
[](https://opencollective.com/gorm)
|
[](https://opencollective.com/gorm)
|
||||||
[](https://opensource.org/licenses/MIT)
|
[](https://opensource.org/licenses/MIT)
|
||||||
[](https://godoc.org/github.com/jinzhu/gorm)
|
[](https://godoc.org/github.com/charm-jp/gorm)
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@ -38,4 +38,4 @@ The fantastic ORM library for Golang, aims to be developer friendly.
|
|||||||
|
|
||||||
© Jinzhu, 2013~time.Now
|
© Jinzhu, 2013~time.Now
|
||||||
|
|
||||||
Released under the [MIT License](https://github.com/jinzhu/gorm/blob/master/License)
|
Released under the [MIT License](https://github.com/charm-jp/gorm/blob/master/License)
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBelongsTo(t *testing.T) {
|
func TestBelongsTo(t *testing.T) {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Product) BeforeCreate() (err error) {
|
func (s *Product) BeforeCreate() (err error) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CustomizeColumn struct {
|
type CustomizeColumn struct {
|
||||||
|
@ -10,9 +10,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/charm-jp/gorm"
|
||||||
// Importing mssql driver package only in dialect file, otherwide not needed
|
// Importing mssql driver package only in dialect file, otherwide not needed
|
||||||
_ "github.com/denisenkom/go-mssqldb"
|
_ "github.com/denisenkom/go-mssqldb"
|
||||||
"github.com/jinzhu/gorm"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func setIdentityInsert(scope *gorm.Scope) {
|
func setIdentityInsert(scope *gorm.Scope) {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestErrorsCanBeUsedOutsideGorm(t *testing.T) {
|
func TestErrorsCanBeUsedOutsideGorm(t *testing.T) {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CalculateField struct {
|
type CalculateField struct {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Person struct {
|
type Person struct {
|
||||||
|
8
main.go
8
main.go
@ -51,10 +51,10 @@ const (
|
|||||||
// db, err := gorm.Open("mysql", "user:password@/dbname?charset=utf8&parseTime=True&loc=Local")
|
// db, err := gorm.Open("mysql", "user:password@/dbname?charset=utf8&parseTime=True&loc=Local")
|
||||||
// }
|
// }
|
||||||
// GORM has wrapped some drivers, for easier to remember driver's import path, so you could import the mysql driver with
|
// GORM has wrapped some drivers, for easier to remember driver's import path, so you could import the mysql driver with
|
||||||
// import _ "github.com/jinzhu/gorm/dialects/mysql"
|
// import _ "github.com/charm-jp/gorm/dialects/mysql"
|
||||||
// // import _ "github.com/jinzhu/gorm/dialects/postgres"
|
// // import _ "github.com/charm-jp/gorm/dialects/postgres"
|
||||||
// // import _ "github.com/jinzhu/gorm/dialects/sqlite"
|
// // import _ "github.com/charm-jp/gorm/dialects/sqlite"
|
||||||
// // import _ "github.com/jinzhu/gorm/dialects/mssql"
|
// // import _ "github.com/charm-jp/gorm/dialects/mssql"
|
||||||
func Open(dialect string, args ...interface{}) (db *DB, err error) {
|
func Open(dialect string, args ...interface{}) (db *DB, err error) {
|
||||||
if len(args) == 0 {
|
if len(args) == 0 {
|
||||||
err = errors.New("invalid database source")
|
err = errors.New("invalid database source")
|
||||||
|
10
main_test.go
10
main_test.go
@ -18,12 +18,12 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/charm-jp/gorm"
|
||||||
|
_ "github.com/charm-jp/gorm/dialects/mssql"
|
||||||
|
_ "github.com/charm-jp/gorm/dialects/mysql"
|
||||||
|
"github.com/charm-jp/gorm/dialects/postgres"
|
||||||
|
_ "github.com/charm-jp/gorm/dialects/sqlite"
|
||||||
"github.com/erikstmartin/go-testdb"
|
"github.com/erikstmartin/go-testdb"
|
||||||
"github.com/jinzhu/gorm"
|
|
||||||
_ "github.com/jinzhu/gorm/dialects/mssql"
|
|
||||||
_ "github.com/jinzhu/gorm/dialects/mysql"
|
|
||||||
"github.com/jinzhu/gorm/dialects/postgres"
|
|
||||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
|
||||||
"github.com/jinzhu/now"
|
"github.com/jinzhu/now"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type User struct {
|
type User struct {
|
||||||
|
@ -3,7 +3,7 @@ package gorm_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestTheNamingStrategy(t *testing.T) {
|
func TestTheNamingStrategy(t *testing.T) {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getPreloadUser(name string) *User {
|
func getPreloadUser(name string) *User {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestScannableSlices(t *testing.T) {
|
func TestScannableSlices(t *testing.T) {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NameIn1And2(d *gorm.DB) *gorm.DB {
|
func NameIn1And2(d *gorm.DB) *gorm.DB {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/charm-jp/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestUpdate(t *testing.T) {
|
func TestUpdate(t *testing.T) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user