Git Product home page Git Product logo

Comments (5)

hsluoyz avatar hsluoyz commented on June 15, 2024

@fanspace can you provide a dameng test env?

from xorm-adapter.

fanspace avatar fanspace commented on June 15, 2024

`Casbin init error
{"level":"error","msg":"Error -4097: 单行子查询返回多行\nstack info:\n 1). mydm.(*dm_build_151).dm_build_184\n \tD:/myproject/backgate/723\n 2). mydm.(*dm_build_151).dm_build_140\n \tD:/myproject/backgate/dm/zq.go:710\n 3). mydm.(*dm_build_151).dm_build_143\n \tD:/myproject/backgate/dm/zq.go:764\n 4). mydm.(*dm_build_1345).dm_build_1388\n \tD:/myproject/backgate/dm/a.go:275\n 5). mydm.(*dm_build
_1345).Dm_build_1456\n \tD:/myproject/backgate/dm/a.go:480\n 6). mydm.(*DmStatement).executeInner\n \tD:/myproject/backgate/d d
m/u.go:998\n 7). mydm.(*DmStatement).query\n \tD:/myproject/backgate/dm/u.go:414\n 8). mydm.(*DmConnection).queryContext\n \tD:/m
ystone/backgate/dm/m.go:653\n 9). mydm.(filterChain).DmConnectionQueryContext\n \tD:/myproject/backgate/dm/zd.go:169\n 10). mydm.(
reconnectFilter).DmConnectionQueryContext\n \tD:/myproject/backgate/dm/zf.go:259\n 11). mydm.(*filterChain).DmConnectionQueryContext\n
\tD:/myproject/backgate/dm/zd.go:166\n 12). mydm.(*DmConnection).QueryContext\n \tD:/myproject/backgate/dm/m.go:303\n 13). database
/sql.ctxDriverQuery\n \tC:/Users/dell/.g/go/src/database/sql/ctxutil.go:48\n 14). database/sql.(*DB).queryDC.func1\n \tC:/Users/de
ll/.g/go/src/database/sql/sql.go:1748\n 15). database/sql.withLock\n \tC:/Users/dell/.g/go/src/database/sql/sql.go:3502\n 16). dat
abase/sql.(*DB).queryDC\n \tC:/Users/dell/.g/go/src/database/sql/sql.go:1743\n 17). database/sql.(*DB).query\n \tC:/Users/dell/.g/
go/src/database/sql/sql.go:1726\n 18). database/sql.(*DB).QueryContext.func1\n \tC:/Users/dell/.g/go/src/database/sql/sql.go:1704\n
19). database/sql.(*DB).retry\n \tC:/Users/dell/.g/go/src/database/sql/sql.go:1538\n 20). database/sql.(*DB).QueryContext\n \tC:
/Users/dell/.g/go/src/database/sql/sql.go:1703\n 21). xorm.io/xorm/core.(*DB).QueryContext\n \tD:/gosrc/pkg/mod/xorm.io/[email protected]/c
ore/db.go:151\n 22). xorm.io/xorm/dialects.(*dameng).GetColumns\n \tD:/gosrc/pkg/mod/xorm.io/[email protected]/dialects/dameng.go:847\n 2
3). xorm.io/xorm.(*Engine).loadTableInfo\n \tD:/gosrc/pkg/mod/xorm.io/[email protected]/engine.go:359\n 24). xorm.io/xorm.(*Session).Sync
n \tD:/gosrc/pkg/mod/xorm.io/[email protected]/session_schema.go:315\n 25). xorm.io/xorm.(*Engine).Sync\n \tD:/gosrc/pkg/mod/xorm.io/xor
[email protected]/engine.go:1122\n 26). xorm.io/xorm.(*Engine).Sync2\n \tD:/gosrc/pkg/mod/xorm.io/[email protected]/engine.go:1128\n 27). github.
com/casbin/xorm-adapter/v3.(*Adapter).createTable\n \tD:/gosrc/pkg/mod/github.com/casbin/xorm-adapter/[email protected]/adapter.go:245\n 28).
github.com/casbin/xorm-adapter/v3.(*Adapter).open\n \tD:/gosrc/pkg/mod/github.com/casbin/xorm-adapter/[email protected]/adapter.go:241\n 29).
github.com/casbin/xorm-adapter/v3.NewAdapter\n \tD:/gosrc/pkg/mod/github.com/casbin/xorm-adapter/[email protected]/adapter.go:105\n 30). ba
ckgate/rbac.InitCasbin\n \tD:/myproject/backgate/rbac/casbin.go:25\n 31). main.main\n \tD:/myproject/backgate/main.go:18\n 32). runtime.main\n \tC:/Users/dell/.g/go/src/runtime/proc.go:267\n"}

`

from xorm-adapter.

hsluoyz avatar hsluoyz commented on June 15, 2024

@fanspace what's your dameng DB version? Where to download a free version for testing? If not, can you provide a connect string for test?

from xorm-adapter.

fanspace avatar fanspace commented on June 15, 2024

the version of dameng is 8.1.3 , you'll get the driver from https://gitee.com/forxing/dm
the free download url of dameng database is https://eco.dameng.com/download/
they also provide a docker version

from xorm-adapter.

MuZhou233 avatar MuZhou233 commented on June 15, 2024

I believe this is not adapter's problem. Here your could see the lines raised this error.

xorm-adapter/adapter.go

Lines 244 to 246 in 634e6df

func (a *Adapter) createTable() error {
return a.engine.Sync2(&CasbinRule{tableName: a.getFullTableName()})
}

As Sync2 is provided by xorm, I suggest you refer to them for help.

from xorm-adapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.