Lunny Xiao
82faf6c301
start v2 ( #2350 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2350
2023-10-27 14:27:46 +00:00
Lunny Xiao
068de8c0f8
Don't warn when database have extra columns which are not in struct ( #2279 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2279
2023-06-23 08:48:37 +00:00
Lunny Xiao
a2d3669edf
Add README and fix some lints ( #2079 )
...
as title.
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2079
2021-12-14 09:00:35 +08:00
fanybook
aea91cc7de
add table & column comment for postgres(add table comment for mysql) ( #2067 )
...
让 postgres 支持字段注释,只在 v1.2.5 上测试过(不知道怎么 import master)
发现 master 分支好像大改了?模式表名带 schema 了
使用方式和 mysql 相同
```go
type User struct {
Id int64 `xorm:"pk autoincr"`
Name string `json:"name" xorm:"not null default '' varchar(50) index(name_age) comment('用户 (it''s) 1; 名')"`
Salt string
Age int `json:"age" xorm:"not null default 0 int(10) index(name_age) comment('年龄')"`
Passwd string `xorm:"varchar(200)"`
CreatedAt time.Time `xorm:"created"`
UpdatedAt time.Time `xorm:"updated"`
}
_ = engine.Sync(new(User))
func (model User) TableComment() string {
return "表注释"
}
```
Co-authored-by: fanybook <fanybook@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2067
Co-authored-by: fanybook <fanybook@noreply.gitea.io>
Co-committed-by: fanybook <fanybook@noreply.gitea.io>
2021-11-12 20:58:05 +08:00
Lunny Xiao
0a429a241d
Drop sync function and rename sync2 to sync ( #2018 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2018
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-08-24 17:13:17 +08:00
Lunny Xiao
c29b9649a9
Add dameng support ( #2007 )
...
driver: https://gitee.com/travelliu/dm
docker: https://download.dameng.com/eco/dm8/dm8_docker.tar
fix #1837
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2007
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-08-24 13:46:08 +08:00
Lunny Xiao
4499c8c5b5
Fix import file bug ( #2025 )
...
Reviewed-on: https://gitea.com/xorm/xorm/pulls/2025
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-08-06 11:26:22 +08:00
Lunny Xiao
717e4a0d21
Add database alias table and fix wrong warning ( #1947 )
...
fix #1831
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1947
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-07-07 17:09:40 +08:00
Lunny Xiao
9286f29576
Fix bug on import when split SQLs ( #1878 )
...
Fix #1876
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1878
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
2021-03-23 21:34:42 +08:00
Lunny Xiao
5053c35701
Don't keep db on dialects ( #1623 )
...
don't keep db on dialects
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1623
2020-03-24 02:19:24 +00:00
Lunny Xiao
b7b2b21a40
Fix dump/import bug ( #1603 )
...
Fix bug
Fix mssql
Fix postgres
Fix import test
Fix dump/import bug
Reviewed-on: https://gitea.com/xorm/xorm/pulls/1603
2020-03-15 02:02:37 +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
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
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
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
bf25a77bca
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
2020-02-24 08:53:18 +00:00
Lunny Xiao
a9e2ecbf44
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
2020-02-20 03:41:19 +00:00
Lunny Xiao
6a47ef9b49
Don't warn when bool column default is 1 but not true ( #1447 )
...
* don't warn when bool column default is 1 but not true
* fix default case sensitive
2019-10-02 15:04:49 +08:00
Lunny Xiao
48579958d5
Fix sync2 with custom table name ( #1445 )
...
* fix sync2 with custom table name
* fix bug on postgres
* fix bug on postgres
2019-10-02 12:37:53 +08:00
Lunny Xiao
98db3ef013
improve sync2 ( #1443 )
2019-09-30 16:32:57 +08:00
Lunny Xiao
c9b14f9487
move depends package from github.com to customize domain ( #1327 )
2019-06-17 13:38:13 +08:00
Lunny Xiao
5750e3f90a
Add context support ( #1193 )
...
* add context support
* improve pingcontext tests
2019-01-20 11:01:14 +08:00
Lunny Xiao
12e0367559
add more tests for Sync2 ( #925 )
2018-05-04 10:51:34 +08:00
Lunny Xiao
a491afac18
fix tablename bug when sync2 ( #921 )
2018-05-02 16:46:39 +08:00
Lunny Xiao
bd20c37bfb
Add SetSchema for engine ( #876 )
...
* add SetSchema for engine
* fix user
* fix postgres with schema
* fix test
* fix test
* fix test
* fix tablename
* refactor tableName
* fix schema support
* improve the interface of EngineInterface
2018-04-10 09:50:29 +08:00
Lunny Xiao
b462eded54
fix sync bug ( #857 )
2018-03-05 18:01:47 +08:00
Lunny Xiao
bb639f6700
refactor query functions ( #689 )
...
* refactor query functions
* remove unused function
* remove unnecessary resetStatement and some improvements
* rename all Id to ID
2017-08-27 15:50:43 +08:00
Lunny Xiao
a10b5aba4b
reduce sessions on Sync ( #685 )
2017-08-20 17:05:42 +08:00
Lunny Xiao
f1aebd5729
hide all undocument variables on session ( #660 )
2017-07-27 13:32:35 +08:00
Lunny Xiao
e561396c0b
add more tests for schema
2017-05-27 22:14:13 +08:00
Lunny Xiao
aae045f9aa
fix #563
2017-04-10 19:45:00 +08:00
Lunny Xiao
bda5f17e01
Handle xorm tags via tagHandler prepared for customerize tag support ( #551 )
...
* handle xorm tags via tagHandler prepared for customerize tag support
* add some comments and improvements
2017-03-30 10:39:38 +08:00
Lunny Xiao
44b70cccf4
add Find ints support & split session into multiple files
2017-01-03 13:31:47 +08:00