#df #orm #carryxd #db #sql

df-db

This is an orm database mysql mssql sqlite

3 releases

new 0.1.11 Jan 25, 2023
0.1.10 Jan 25, 2023

#500 in Database interfaces

Download history 20/week @ 2023-01-07 41/week @ 2023-01-14 279/week @ 2023-01-21

340 downloads per month
Used in df-plugin

MIT license

86KB
2.5K SLoC

df-db ORM 数据库


License Crates.io Version

Installation


Cargo.toml

[dependencies]
df-db = "*"

支持数据库

  • Mysql
  • Sqlite
  • Mssql

配置

{
  "default": "mysql",
  "connections": {
    "sqlite": {
      "mode": "sqlite",
      "keyauto": false,
      "hostname": "/系统目录/",
      "hostport": "",
      "database": "testDB",
      "username": "",
      "userpass": "",
      "charset": "utf8mb4",
      "prefix": "",
      "params": [],
      "debug": false
    },
    "mysql": {
      "mode": "mysql",
      "keyauto": false,
      "hostname": "127.0.0.1",
      "hostport": 3306,
      "database": "",
      "username": "",
      "userpass": "",
      "charset": "utf8mb4",
      "prefix": "",
      "params": [],
      "debug": true
    },
    "mssql": {
      "mode": "mssql",
      "keyauto": false,
      "hostname": "127.0.1",
      "hostport": 1433,
      "database": "",
      "username": "",
      "userpass": "",
      "charset": "utf8mb4",
      "prefix": "",
      "params": [],
      "debug": true
    }
  }
}

Dependencies

~19–28MB
~552K SLoC