Commit Graph

1640 Commits

Author SHA1 Message Date
Lunny Xiao 9500b23395 Fix pk bug (#1602)
Fix pk bug

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1602
2020-03-13 08:57:34 +00:00
Lunny Xiao c56c8e122a Fix master/slave bug (#1601)
fix test

Fix master/slave bug

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1601
2020-03-13 00:42:01 +00:00
joelBai c2bf301bdb fix batch insert interface slice be panic (#1598)
fix batch insert []interface{*struct, ...} be panic;add TestInsertMulti2Interface testcase

Co-authored-by: baijinping <baikkp@126.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1598
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-03-12 12:05:26 +00:00
Lunny Xiao 367b15879e Fix bug when dump (#1597)
Fix bug when dump

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1597
2020-03-11 23:30:35 +00:00
Lunny Xiao 94fd254638 Support count with cols (#1595)
Support count with cols

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1595
2020-03-11 03:29:43 +00:00
Lunny Xiao 537d82a6f7 Ignore schema when dbtype is not postgres (#1593)
Ignore schema when dbtype is not postgres

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1593
2020-03-10 13:15:18 +00:00
Lunny Xiao 6485adb722 Fix table name (#1590)
add test

Fix table name

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1590
2020-03-10 08:15:13 +00:00
Jerry 2f95c750c3 jerry:add postgre data_type array (#1589)
fix err,add postgres column ARRAY

fix err,add postgres column ARRAY

Co-authored-by: Jerry <85411418@qq.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1589
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
2020-03-10 06:11:42 +00:00
Lunny Xiao 9d4594632f Fix mssql issue with duplicate columns. (#1225)
fix test

fix test

Fix mssql issue with duplicate columns.

The `GetColumns()` method for the mssql dialect can return the same
column multiple times if the column is in multiple indexes.

Co-authored-by: Robert G. Jakabosky <bobby@sharedrealm.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1225
2020-03-10 04:46:46 +00:00
Lunny Xiao 36e26e35ed 解决Conversion接口ToDB() ([]byte, error)方法返回*Type值为nil时,数据类型为[]byte(nil)的… (#1296)
add test

解决Conversion接口ToDB() ([]byte, error)方法返回*Type值为nil时,数据类型为[]byte(nil)的bug,解决*Type值为nil时插入数据变为""的bug

Co-authored-by: peihexian <peihexian@qq.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1296
2020-03-10 03:02:31 +00:00
Lunny Xiao f13883a725 check driver.Valuer response, and skip the column if nil (#1167)
update tests

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1167
2020-03-10 03:01:32 +00:00
Lunny Xiao 67cf42799c Remove duplicated code (#1588)
Remove duplicated code

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1588
2020-03-10 01:03:33 +00:00
Lunny Xiao 188da20272 Move value2interface from session to statement package (#1587)
Fix zero

Fix tests

Move value2interface from session to statement package

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1587
2020-03-09 08:03:59 +00:00
Lunny Xiao 4ef030c9cc mysql8.0 中同步数据前,获取数据库结构,因tableRaw为空导致同步失败 (#808)
mysql8.0 中同步数据前,获取数据库结构,因tableRaw为空导致同步失败

Co-authored-by: 崔彦鹏 <mohong122@qq.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/808
2020-03-09 06:37:03 +00:00
Lunny Xiao 3617ee736f Only replace quotes when necessary (#1584)
fix test

improve code

improve code

improve code

improve code

Fix replace quote

fix test

Only replace quotes when necessary

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1584
2020-03-09 02:17:37 +00:00
Lunny Xiao 00b65c6d99 Update README (#1582)
Remove version

Update README

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1582
2020-03-08 06:10:05 +00:00
Lunny Xiao f238bb9d07 Improve insert (#1583)
Improve insert

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1583
2020-03-08 05:14:28 +00:00
Lunny Xiao 8b100bb7d4 Fix find alias bug (#1581)
Code improvement

Fix find alias bug

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1581
2020-03-08 02:29:25 +00:00
Lunny Xiao 257653726e return sqls for create table (#1580)
return sqls for create table

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1580
2020-03-07 12:06:28 +00:00
Lunny Xiao ccf65397e8 Improve dialect interface (#1579)
Fix bug

Improve dialect interface

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1579
2020-03-07 10:00:05 +00:00
Lunny Xiao 7f22948be9 Improve dialect interface (#1578)
Improve dialect interface

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1578
2020-03-07 08:51:30 +00:00
Lunny Xiao 0f166d82da Fix rows bug (#1576)
Fix rows bug

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1576
2020-03-06 12:08:32 +00:00
Lunny Xiao fa219bb836 Fix map with cols (#1575)
Fix cache bug

Fix map with cols

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1575
2020-03-06 08:55:12 +00:00
Lunny Xiao 7455014823 Improve quote policy (#1567)
names with upper charactor on postgres will need quotes

Fix bug

Add new quote parameter on tests

Fix bug

Fix tests

Fix quotes

fix test

Improve quote policy

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1567
2020-03-06 07:48:32 +00:00
Lunny Xiao f51d28304a Move some codes to statement sub package (#1574)
revert change for delete

refactor new engine

fix tests

Move some codes to statement sub package

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1574
2020-03-06 06:43:49 +00:00
Lunny Xiao 7278e2ab71 Improve tests (#1572)
fix test

Improve tests

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1572
2020-03-04 03:30:21 +00:00
Lunny Xiao d1cda3f21b oracle support doulbe quote but not square quote (#1571)
oracle support doulbe quote but not square quote

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1571
2020-03-03 13:17:57 +00:00
Lunny Xiao 6160c8c670 fix bug on deleted with join (#1570)
fix bug on deleted with join

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1570
2020-03-03 12:45:27 +00:00
Lunny Xiao 36c62d15f3 Remove circle file (#1569)
Remove circle file

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1569
2020-03-03 09:13:46 +00:00
Lunny Xiao b079bc05ff Add cockroach support and tests (#896)
Fix tests

fix some tests and ignore some

Add &experimental_serial_normalization=sql_sequence on test so that id will increase from 1

fix drone

Fix drone

Fix drone

Fix drone

Remove space

Add makefile

fix drone

fix drone

fix drone

update

fix tests

use sql_sequence when testing

fix postgres ci

fix circle ci for cockroach

upgrade cockroach version

add trace on error

add drone ci

run cockroach background

run cockroach backround

run cockroach backround

fix test

fix run cockroach

add cockroach test to circleci

add cockroach support

Add tests for table name (#1...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/896
2020-03-03 08:19:32 +00:00
Lunny Xiao 4e59597a49 Fix break session sql enable feature (#1566)
Fix break session sql enable feature

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1566
2020-03-01 03:05:26 +00:00
Lunny Xiao c13117f0e6 Fix outdate changelog (#1565)
Fix outdate changelog

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1565
2020-02-29 09:30:26 +00:00
Lunny Xiao 41388c2f56 Use a new ContextLogger interface to implement logger (#1557)
Fix bug

Add log track on prepare & tx

Some improvements

remove unused codes

refactor logger

Fix bug

log context

add ContextLogger interface

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1557
2020-02-29 08:59:59 +00:00
Lunny Xiao 2b62dc5a51 Move statement as a sub package (#1564)
Fix test

Fix bug

Move statement as a sub package

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1564
2020-02-28 12:29:08 +00:00
Lunny Xiao f63b42ff9b Move maptype to tag parser (#1561)
Move maptype to tag parser

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1561
2020-02-28 02:00:21 +00:00
Lunny Xiao 29c93926a7 Add minial go version go1.11 check on drone (#1560)
Add minial go version go1.11 check on drone

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1560
2020-02-28 00:01:46 +00:00
Lunny Xiao 4c2b0e0f55 Add context for dialects (#1558)
More improvements

Add context for dialects

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1558
2020-02-27 15:31:05 +00:00
Lunny Xiao 7bf9a7a73c Improve statement (#1555)
Fix test

Improve statement

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1555
2020-02-27 05:49:43 +00:00
Lunny Xiao e2f9100419 Move tag parser related codes as a standalone sub package (#1547)
Fix sliceEq

fix tests

Move tag parser related codes as a standalone sub package

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1547
2020-02-27 03:58:31 +00:00
Lunny Xiao aa522f7d98 Improve code (#1552)
Change filters

Fix test

add more tests on drone

add more tests on drone

Improve code

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1552
2020-02-27 03:33:40 +00:00
Lunny Xiao 02c8a4b25d Move caches to manager (#1553)
Move caches to manager

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1553
2020-02-27 03:12:25 +00:00
Lunny Xiao a421331cf9 Improve some codes (#1551)
Improve code

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1551
2020-02-27 01:30:06 +00:00
Lunny Xiao 5a5375a170 Improve statement (#1549)
Fix cache bug

Improve statement

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1549
2020-02-27 00:34:16 +00:00
Lunny Xiao 757db3b888 Moved examples out of the main repository (#1550)
Moved examples out of the main repository

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1550
2020-02-26 23:46:17 +00:00
Lunny Xiao 390effb8a4 Move zero functions to a standalone package (#1548)
Remove depreciated functions and move some functions to schemas

Move zero functions to a standalone package

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1548
2020-02-26 12:45:10 +00:00
Lunny Xiao f3d9c49635 Add changelog file and tool configuration (#1546)
Add changelog file and tool configuration

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1546
2020-02-26 01:05:04 +00:00
Lunny Xiao 049a28cfb7 Add leveldb cache store (#1545)
Add leveldb cache store

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1545
2020-02-25 12:22:21 +00:00
Lunny Xiao cc33b2d305 Fix join table name quote bug (#1534)
Fix test

Fix test

Add new Quoter object to handle quote

Fix join table name quote bug

Move reserve words related files into dialects sub package (#1544)

Move reserve words related files into dialects sub package

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1544

Fix mssql quote (#1535)

Fix some quotes

Fix mssql quote

Merge core package back into the main repository and split into serval sub packages. (#1543)

Fix test

Improve fmt

update go.mod

Move core as a sub package

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1543

Fix int time deleted bug (#1539)

Fix panic

Fix test

Fix test for mssql time

Add sql type check on deleted cond

Fix int time deleted bug

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1539

Add test for mysql8.0 (#1538)

Fix pk order on test

Add test for mysql8.0

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1538

Add test for join limit (#1536)

Add test for join limit

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1536

Improve drone (#1537)

Fix drone

Improve drone

* use traditional positional parameters on inser...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1537

Fix slice of struct not cache bug (#895)

Fix failure caused by nil bean

Judge both type of struct and pointer in case of out-of-range

Fix issue #894

Add test for join subquery (#1528)

Fix test

Fix subquery with schema

Add test for join subquery

Add makefile (#1531)

Fix drone

Fix ci

Add deps

Improve drone

Fix envs

Add makefile

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1531

Add password for postgres drone image (#1530)

Add password for postgres drone image

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1530

format time when sqlTypeName is core.Varchar (#1026)

fix time test

add test for time format

sign codes according to contributing rules.

format time when sqlTypeName is core.Varchar. Same with core.DateTime or core.TimeStamp

Add test for second insert error (#1527)

Add test for second insert error

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1527

Add tests for table name (#1517)

add tests for table name

Fix test (#1526)

Fix test

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1526

Fix test (#1526)

Fix test

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1526

Fix wrong warning log on autoincrement column when sync table (#1525)

improve doc

Fix wrong warning log on autoincrement column when sync table

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1525

Fixed Join strings on func Exist (#1520)

fix test

fixed Join strings on func Exist

Co-authored-by: Tomofumi Kusana <tkusana@morisawa.co.jp>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1520

For nullable columns, store nil values as NULL (#531)

Merge branch 'master' into jcsalem/fix/nil_ptr_is_nullable

fix bug when buffersize with iterate (#941)

Merge branch 'master' into lunny/fix_buffer_iterate

Exclude schema from index name (#1505)

Merge branch 'master' into fix-schema-idx

SetExpr support more go types (#1499)

Improve tests

SetExpr support more go types

fix vet

fix drone lint

remove go1.10 test on drone

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1499

fix vet

fix drone lint

remove go1.10 test on drone

Exclude schema from the index name

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1505

fix test

fix bug

fix bug when buffersize with iterate

SetExpr support more go types (#1499)

Improve tests

SetExpr support more go types

fix vet

fix drone lint

remove go1.10 test on drone

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1499

fix vet

fix drone lint

remove go1.10 test on drone

Fix update with Alias (#1455)

Co-authored-by: Guillermo Prandi <guillep2k@noreply.gitea.io>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/941

fix update map with version (#1448)

fix test

fix update map with version

SetExpr support more go types (#1499)

Improve tests

SetExpr support more go types

fix vet

fix drone lint

remove go1.10 test on drone

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1499

fix vet

fix drone lint

remove go1.10 test on drone

Fix update with Alias (#1455)

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1448

Exclude schema from index name (#1505)

Merge branch 'master' into fix-schema-idx

SetExpr support more go types (#1499)

Improve tests

SetExpr support more go types

fix vet

fix drone lint

remove go1.10 test on drone

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1499

fix vet

fix drone lint

remove go1.10 test on drone

Exclude schema from the index name

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1505

SetExpr support more go types (#1499)

Improve tests

SetExpr support more go types

fix vet

fix drone lint

remove go1.10 test on drone

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1499

For nullable columns, store nil values as NULL

fix vet

fix drone lint

remove go1.10 test on drone

Fix update with Alias (#1455)

Improve c...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1534
2020-02-25 00:01:36 +00:00
Lunny Xiao 3df77142b3 Move reserve words related files into dialects sub package (#1544)
Move reserve words related files into dialects sub package

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1544
2020-02-24 10:05:10 +00:00
Lunny Xiao a90b7a48b4 Fix mssql quote (#1535)
Fix some quotes

Fix mssql quote

Merge core package back into the main repository and split into serval sub packages. (#1543)

Fix test

Improve fmt

update go.mod

Move core as a sub package

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1543

Fix int time deleted bug (#1539)

Fix panic

Fix test

Fix test for mssql time

Add sql type check on deleted cond

Fix int time deleted bug

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1539

Add test for mysql8.0 (#1538)

Fix pk order on test

Add test for mysql8.0

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1538

Add test for join limit (#1536)

Add test for join limit

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1536

Improve drone (#1537)

Fix drone

Improve drone

* use traditional positional parameters on inser...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1537

Fix slice of struct not cache bug (#895)

Fix failure caused by nil bean

Judge both type of struct and pointer in case of out-of-range

Fix issue #894

Add test for join subquery (#1528)

Fix test

Fix subquery with schema

Add test for join subquery

Add makefile (#1531)

Fix drone

Fix ci

Add deps

Improve drone

Fix envs

Add makefile

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1531

Add password for postgres drone image (#1530)

Add password for postgres drone image

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1530

format time when sqlTypeName is core.Varchar (#1026)

fix time test

add test for time format

sign codes according to contributing rules.

format time when sqlTypeName is core.Varchar. Same with core.DateTime or core.TimeStamp

Add test for second insert error (#1527)

Add test for second insert error

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1527

Add tests for table name (#1517)

add tests for table name

Fix test (#1526)

Fix test

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1526

Fix test (#1526)

Fix test

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1526

Fix wrong warning log on autoincrement column when sync table (#1525)

improve doc

Fix wrong warning log on autoincrement column when sync table

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1525

Fixed Join strings on func Exist (#1520)

fix test

fixed Join strings on func Exist

Co-authored-by: Tomofumi Kusana <tkusana@morisawa.co.jp>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1520

For nullable columns, store nil values as NULL (#531)

Merge branch 'master' into jcsalem/fix/nil_ptr_is_nullable

fix bug when buffersize with iterate (#941)

Merge branch 'master' into lunny/fix_buffer_iterate

Exclude schema from index name (#1505)

Merge branch 'master' into fix-schema-idx

SetExpr support more go types (#1499)

Improve tests

SetExpr support more go types

fix vet

fix drone lint

remove go1.10 test on drone

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1499

fix vet

fix drone lint

remove go1.10 test on drone

Exclude schema from the index name

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1505

fix test

fix bug

fix bug when buffersize with iterate

SetExpr support more go types (#1499)

Improve tests

SetExpr support more go types

fix vet

fix drone lint

remove go1.10 test on drone

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1499

fix vet

fix drone lint

remove go1.10 test on drone

Fix update with Alias (#1455)

Co-authored-by: Guillermo Prandi <guillep2k@noreply.gitea.io>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/941

fix update map with version (#1448)

fix test

fix update map with version

SetExpr support more go types (#1499)

Improve tests

SetExpr support more go types

fix vet

fix drone lint

remove go1.10 test on drone

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1499

fix vet

fix drone lint

remove go1.10 test on drone

Fix update with Alias (#1455)

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1448

Exclude schema from index name (#1505)

Merge branch 'master' into fix-schema-idx

SetExpr support more go types (#1499)

Improve tests

SetExpr support more go types

fix vet

fix drone lint

remove go1.10 test on drone

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1499

fix vet

fix drone lint

remove go1.10 test on drone

Exclude schema from the index name

Co-authored-by: Guillermo Prandi <guillep2k@users.noreply.github.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1505

SetExpr support more go types (#1499)

Improve tests

SetExpr support more go types

fix vet

fix drone lint

remove go1.10 test on drone

Reviewed-on: https://gitea.com/xorm/xorm/pulls/1499

For nullable columns, store nil values as NULL

fix vet

fix drone lint

remove go1.10 test on drone

Fix update with Alias (#1455)

Improve ci tests (#1477)

Rewrite Engine.QuoteTo() to accept multi-part identifiers (#1476)

Support local sql log (#1338)

Fix go mod and update version (#1460)

Move github.com/go-xorm/xorm to xorm.io/xorm (#1459)

add support custom type Nullfloat64 (#1450)

fix bug when query map condtion with no quo...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1535
2020-02-24 10:03:48 +00:00