{"repo":"apache/casbin-sqlx-adapter","free":true,"listed":false,"github":"https://github.com/apache/casbin-sqlx-adapter","clone":"git clone https://github.com/apache/casbin-sqlx-adapter.git","description":"Asynchronous casbin adapter for mysql, postgres, sqlite based on sqlx-rs","language":"Rust","stars":61,"topics":["sqlx-adapter","postgres","mysql","casbin","casbin-rs","rust","rbac","abac","acl","permission"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"sqlx-adapter sqlx-adapter is the Sqlx adapter for casbin-rs. With this library, Casbin can load policy from Sqlx supported database or save policy to it with fully asynchronous support. Based on Sqlx, The current supported databases are: - MySQL - PostgreSQL - SQLite Notice In order to unify the database table name in Casbin ecosystem, we decide to use casbin rule instead of casbin rules from version 0.4.0 . If you are using old version sqlx-adapter in your production environment, please use following command and update sqlx-adapter version: Install Add the following to Cargo.toml : For MySQL: For PostgreSQL: For SQLite: Warning : tokio v1.0 or later is supported from sqlx-adapter v0.4.0 , we recommend that you upgrade the relevant components to ensure that they work properly. The last version that supports tokio v0.2 is sqlx-adapter v0.3.0 , you can choose according to your needs. Configure No database is needed to build this crate. All queries are executed at runtime, so cargo build works offline and you never have to set DATABASE URL or run cargo sqlx prepare in your own project. The steps below are only about the database your application talks to at runtime (and about running this repository's own test suite). 1. Set up database environment One convenient option is using docker to get your database environment ready: 2. Create table casbin rule SqlxAdapter issues CREATE TABLE IF NOT EXISTS on startup, so this is optional — do it yourself only if your database user is not","default_branch":null,"files":null,"tree":[],"storefront":"/r/apache","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/apache/casbin-sqlx-adapter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}