cychiuae / casbin-pg-adapter Goto Github PK
View Code? Open in Web Editor NEWPostgreSQL adapter for Casbin
License: Apache License 2.0
PostgreSQL adapter for Casbin
License: Apache License 2.0
Currently this is not supported:
https://github.com/casbin/casbin/blob/master/persist/batch_adapter.go
https://casbin.org/docs/en/policy-subset-loading
I can submit a PR for this if you're open to reviewing one.
I woke up today to see our CI was failing:
github.com/casbin/[email protected]: invalid version: unknown revision v0.1.5
Seems for some reason you changed versions to remove the 0.1.5
for 0.0.5.
Please don't rewrite tag history as go mod depends on that for versioning and managing dependencies, and on top of that it defeats the purpose of using versioning in the first place.
I'm using DB with some schemas.
How can I create new cabin table in a schema DB?
I tried and got an error message:
with tableName = "ABC.auth_permission"
Cannot create index for column: p_type. Error: pq: syntax error at or near "."
Index query like: CREATE INDEX IF NOT EXISTS idx_ABC.auth_permission_p_type ON ABC.auth_permission (p_type)
Please help to fix it. Thanks!
Since the table that is created does not have a PK, it's impossible to do DELETE/UPDATE statements on it in case the DB instance has a publication set for ALL TABLES
(https://www.postgresql.org/docs/current/logical-replication-publication.html). This is not uncommon in more complex environments.
In order to prevent people from having to fix the table created by this adapter, I would propose either adding a PK to it or setting the REPLICA IDENTITY
to FULL
. If you go with the PK, you could either do it on the full row (not sure if there are any bad side effects from that) or simply add an ID column (seems a bit useless perhaps). Setting the REPLICA IDENTITY
can be done using ALTER TABLE ... REPLICA IDENTITY FULL
.
This looks really nice! Thanks for the effort, you just saved me a ton of time :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.