janse_zyd
  • Joined on Dec 02, 2019
Loading Heatmap…

janse_zyd commented on issue xorm/xorm#1913

是否可以考虑支持rqlite

This is not a database/sql driver: https://github.com/rqlite/gorqlite

8 months ago

janse_zyd commented on issue xorm/xorm#1913

是否可以考虑支持rqlite

这个没有提供golang的驱动

8 months ago

janse_zyd created pull request xorm/xorm#1914

WIP: Replace godror with goacle

8 months ago

janse_zyd pushed to master at janse_zyd/xorm

8 months ago

janse_zyd merged pull request janse_zyd/xorm#1

master

8 months ago

janse_zyd pushed to master at janse_zyd/xorm

8 months ago

janse_zyd created pull request janse_zyd/xorm#1

master

8 months ago

janse_zyd closed issue xorm/xorm#1912

是否可以考虑支持rqlite?

8 months ago

janse_zyd opened issue xorm/xorm#1913

是否可以考虑支持rqlite

8 months ago

janse_zyd opened issue xorm/xorm#1912

是否可以考虑支持rqlite?

8 months ago

janse_zyd created repository janse_zyd/xorm

9 months ago

janse_zyd commented on issue xorm/xorm#1875

怎么支持oracle的这个数据库驱动github.com/godror/godror

dialects/dialect.go中,goracle应该改为godror

9 months ago

janse_zyd opened issue xorm/xorm#1608

DumpTables支持只导出表结构而不导出数据

2 years ago

janse_zyd commented on issue xorm/xorm#1599

Update BUG

第一个问题呢?非core.PK,有解决办法吗? UPDATE test SET name = ?, remark = ? WHERE i_d=? [123 name2 test1 123]

2 years ago

janse_zyd commented on issue xorm/xorm#1599

Update BUG

package main import ( "fmt" "os" _ "github.com/mattn/go-sqlite3" "xorm.io/core" "xorm.io/xorm" "xorm.io/xorm/names" ) var engine *xorm.Engine type Test struct { ID string `xorm:"notnull pk" description:"唯一ID号"` Name string `xorm:"notnull pk" description:"名称"` Value string `xorm:"notnull varchar(4000)" description:"值"` } func main() { f := "test.db" os.Remove(f) orm, err := xorm.NewEngine("sqlite3", f) if err != nil { fmt.Println(err) return } defer orm.Close() orm.SetMapper(names.SameMapper{}) orm.ShowSQL(true) orm.Sync2(&Test{}) test := &Test{ ID: "ID1", Name: "Name1", Value: "1", } _, err = orm.Insert(test) if err != nil { fmt.Println(err) return } // OK test.Value = "2" _, err = orm.Where("ID = ? And Name = ?", test.ID, test.Name).Cols("Value").Update(test) if err != nil { fmt.Println(err) return } // Error 1 // UPDATE `Test` SET `Value` = ? WHERE (ID = ? And Name = ?) [3 ID1 Name1] test.Value = "3" num, err := orm.Where("ID = ? And Name = ?", test.ID, test.Name).Update(test) if err != nil { fmt.Println("error1 = ", err) } else { // update语句有错误,更新失败 fmt.Println("num = ", num) } // Error 2 test.Value = "4" _, err = orm.ID(core.PK{test.ID, test.Name}).Update(test) if err != nil { fmt.Println("error2 = ", err) } } // output [xorm] [info] 2020/03/13 10:10:50.814754 [SQL] SELECT name FROM sqlite_master WHERE type='table' [] - 789.996µs [xorm] [info] 2020/03/13 10:10:50.824406 [SQL] CREATE TABLE IF NOT EXISTS `Test` (`ID` TEXT NOT NULL, `Name` TEXT NOT NULL, `Value` TEXT NOT NULL, PRIMARY KEY ( `ID`,`Name` )) [] - 9.051932ms [xorm] [info] 2020/03/13 10:10:50.830424 [SQL] INSERT INTO `Test` (`ID`,`Name`,`Value`) VALUES (?, ?, ?) [ID1 Name1 1] - 5.792604ms [xorm] [info] 2020/03/13 10:10:50.836918 [SQL] UPDATE `Test` SET `Value` = ? WHERE (ID = ? And Name = ?) [2 ID1 Name1] - 6.26201ms [xorm] [info] 2020/03/13 10:10:50.837103 [SQL] UPDATE `Test` SET `Value` = ? WHERE (ID = ? And Name = ?) [ID1 Name1 3 ID1 Name1] - 109.308µs num = 0 error2 = ID condition is error, expect 2 primarykeys, there are 1

2 years ago

janse_zyd commented on issue xorm/xorm#1599

Update BUG

xorm.io/xorm v0.8.3-0.20200311032943-94fd25463869

2 years ago

janse_zyd commented on issue xorm/xorm#1599

Update BUG

UPDATE `test` SET `name` = ?, `remark` = ? WHERE `i_d`=? [123 name2 test1 123] 正确应该是: UPDATE `test` SET `name` = ?, `remark` = ? WHERE `i_d`=? [name2 test1 123]

2 years ago

janse_zyd opened issue xorm/xorm#1599

Update BUG

2 years ago

janse_zyd commented on pull request xorm/xorm#1557

Use a new ContextLogger interface to implement logger

没问题

2 years ago

janse_zyd opened issue xorm/xorm#1510

CreateTableSql能否支持格式化显示,并添加Comment内容

2 years ago