This commit is contained in:
Lunny Xiao 2020-03-27 14:53:43 +08:00
parent a46b4877d9
commit 49c1f78115
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
8 changed files with 30 additions and 9 deletions

View File

@ -3,12 +3,13 @@ kind: pipeline
name: testing name: testing
steps: steps:
- name: test-vet - name: test-vet
image: golang:1.11 image: golang:1.11 # The lowest golang requirement
environment: environment:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.cn"
commands: commands:
- make vet - make vet
- make test
when: when:
event: event:
- push - push
@ -20,11 +21,9 @@ steps:
GO111MODULE: "on" GO111MODULE: "on"
GOPROXY: "https://goproxy.cn" GOPROXY: "https://goproxy.cn"
commands: commands:
- make test
- make test-sqlite - make test-sqlite
- TEST_CACHE_ENABLE=true make test-sqlite - TEST_CACHE_ENABLE=true make test-sqlite
- TEST_QUOTE_POLICY=reserved make test-sqlite - TEST_QUOTE_POLICY=reserved make test-sqlite
when: when:
event: event:
- push - push

View File

@ -67,6 +67,8 @@ Drivers for Go's sql package which currently support database/sql includes:
* Create Engine * Create Engine
Firstly, we should new an engine for a database.
```Go ```Go
engine, err := xorm.NewEngine(driverName, dataSourceName) engine, err := xorm.NewEngine(driverName, dataSourceName)
``` ```

View File

@ -205,7 +205,11 @@ var (
"PROC": true, "PROC": true,
} }
mssqlQuoter = schemas.Quoter{'[', ']', schemas.AlwaysReserve} mssqlQuoter = schemas.Quoter{
Prefix: '[',
Suffix: ']',
IsReserved: schemas.AlwaysReserve,
}
) )
type mssql struct { type mssql struct {

View File

@ -162,7 +162,11 @@ var (
"ZEROFILL": true, "ZEROFILL": true,
} }
mysqlQuoter = schemas.Quoter{'`', '`', schemas.AlwaysReserve} mysqlQuoter = schemas.Quoter{
Prefix: '`',
Suffix: '`',
IsReserved: schemas.AlwaysReserve,
}
) )
type mysql struct { type mysql struct {

View File

@ -499,7 +499,11 @@ var (
"ZONE": true, "ZONE": true,
} }
oracleQuoter = schemas.Quoter{'[', ']', schemas.AlwaysReserve} oracleQuoter = schemas.Quoter{
Prefix: '[',
Suffix: ']',
IsReserved: schemas.AlwaysReserve,
}
) )
type oracle struct { type oracle struct {

View File

@ -767,7 +767,11 @@ var (
"ZONE": true, "ZONE": true,
} }
postgresQuoter = schemas.Quoter{'"', '"', schemas.AlwaysReserve} postgresQuoter = schemas.Quoter{
Prefix: '"',
Suffix: '"',
IsReserved: schemas.AlwaysReserve,
}
) )
var ( var (

View File

@ -144,7 +144,11 @@ var (
"WITHOUT": true, "WITHOUT": true,
} }
sqlite3Quoter = schemas.Quoter{'`', '`', schemas.AlwaysReserve} sqlite3Quoter = schemas.Quoter{
Prefix: '`',
Suffix: '`',
IsReserved: schemas.AlwaysReserve,
}
) )
type sqlite3 struct { type sqlite3 struct {

2
doc.go
View File

@ -8,7 +8,7 @@ Package xorm is a simple and powerful ORM for Go.
Installation Installation
Make sure you have installed Go 1.6+ and then: Make sure you have installed Go 1.11+ and then:
go get xorm.io/xorm go get xorm.io/xorm