Comments (5)
@fanspace can you provide a dameng test env?
from xorm-adapter.
`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.
@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.
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.
I believe this is not adapter's problem. Here your could see the lines raised this error.
Lines 244 to 246 in 634e6df
As
Sync2
is provided by xorm
, I suggest you refer to them for help.from xorm-adapter.
Related Issues (20)
- Is it necessary to add 'p_type' tag to compatible the old version? HOT 1
- the func SavePolicy will drop table? HOT 2
- xorm is moving to gitea.com HOT 1
- panic: interface conversion: *xormadapter.Adapter is not persist.Adapter: missing method LoadPolicy HOT 9
- fail to mssql HOT 2
- Adapter.SavePolicy() not safe for concurrent use? HOT 6
- Implement UpdatePolicy() API (aka UpdatableAdapter interface) HOT 1
- Interface conversion (Panic) *xormadapter.Adapter is not persist.UpdatableAdapter: missing method UpdatePolicies HOT 2
- SavePolicy reports "No element on slice when insert" error when the model's policy is null HOT 10
- Switch to GitHub Actions CI and add semantic-release HOT 2
- Missing method UpdateFilteredPolicies HOT 4
- Support table prefix HOT 2
- UpdateFilteredPolicies returns the oldPolicy containing ptype, Is this a bug? HOT 6
- README is wrong (for v1 only) HOT 1
- [BREAKING CHANGE] Rename PType to Ptype like gorm-adapter HOT 2
- [Question] Can I configure casbin xorm to "skip" table creation ? HOT 7
- Fails to connect to pg 16.1 HOT 5
- xorm-adapter v2 not find HOT 2
- feature: fix the context adapter feature HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xorm-adapter.