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
steps:
- name: test-vet
image: golang:1.11
image: golang:1.11 # The lowest golang requirement
environment:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
commands:
- make vet
- make test
when:
event:
- push
@ -20,11 +21,9 @@ steps:
GO111MODULE: "on"
GOPROXY: "https://goproxy.cn"
commands:
- make test
- make test-sqlite
- TEST_CACHE_ENABLE=true make test-sqlite
- TEST_QUOTE_POLICY=reserved make test-sqlite
when:
event:
- push

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

2
doc.go
View File

@ -8,7 +8,7 @@ Package xorm is a simple and powerful ORM for Go.
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