RepositoryOCamlDKĐan Mạch
paurkedal

paurkedal/ocaml-caqti

Cooperative-threaded access to relational data

356sao
46fork
13issue
3lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: io-monad

#1 Repository của tháng

1
TINIX TRENDING·Chủ đề: lwt

#1 Repository của tháng

4
TINIX TRENDING·Chủ đề: ocaml

#4 Repository của tháng

🔌 Caqti — Lớp kết nối CSDL đa nền tảng cho OCaml

Caqti cung cấp API kết nối CSDL quan hệ theo mô hình monadic cooperative-threaded cho OCaml, giúp ứng dụng độc lập với hệ quản trị cơ sở dữ liệu cụ thể.

Caqti là một thư viện OCaml cho phép truy cập dữ liệu quan hệ một cách thống nhất qua các driver riêng biệt. Thay vì phụ thuộc trực tiếp vào một hệ quản trị CSDL, Caqti định nghĩa một giao diện chung (signature), các driver triển khai giao diện này và kết nối được cấu hình qua URI. Caqti không sinh hoặc phân tích SQL, nhưng hỗ trợ templating và xử lý tham số truy vấn đồng nhất, bao gồm mã hóa/giải mã dữ liệu theo kiểu đã khai báo.

✨ Điểm nổi bật

  • Kết nối đa CSDL: hỗ trợ PostgreSQL, MariaDB, SQLite3 thông qua URI scheme tương ứng.
  • Driver dựa trên thư viện C: sử dụng binding C của mariadb, postgresql, sqlite3 cho hiệu năng cao.
  • Driver PGX thử nghiệm: hỗ trợ MirageOS thông qua thư viện pgx.
  • Tích hợp đa mô hình bất đồng bộ: hỗ trợ Lwt, Async, EIO và Miou.
  • Độc lập driver: ứng dụng p có link trực tiếp driver cần thiết hoặc dùng thư viện caqti.plugin để tải driver tại thời gian chạy.
  • Templating truy vấn: hỗ trợ mẫu truy vấn và xử lý tham số đồng nhất.
  • Mã hóa/giải mã kiểu an toàn: dữ liệu được mã hóa theo kiểu khai báo, giảm lỗi thời gian chạy.
  • Hỗ trợ MirageOS: một số driver hỗ trợ môi trường MirageOS.

💡 Vì sao đáng chú ý

Caqti khác biệt bằng cách tách biệt logic ứng dụng và lớp truy cập CSDL thông qua một giao diện chung. Điều này giúp các dự án OCaml dễ dàng chuyển đổi giữa các hệ quản trị CSDL khác nhau chỉ bằng cách thay đổi URI kết nối, rất phù hợp cho các hệ thống cần triển khai đa môi trường hoặc dự án nghiên cứu sử dụng CSDL khác nhau.


#OCaml #Database #PostgreSQL #MariaDB #SQLite #Lwt #Async #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryTypeScript
typeorm/typeorm

TypeScript & JavaScript ORM for Node.js — supports PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, and more.

36.7k
Nov 25, 2026
RepositoryRust
transact-rs/sqlx

🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite.

17.8k
Nov 29, 2026
RepositoryJava
dbeaver/dbeaver

Free universal database tool and SQL client

52.6k
Nov 30, 2026
RepositoryTypeScript
prisma/orm

The Prisma ORM: write your application in TypeScript with human-readable queries instead of SQL. Host your database on Prisma Postgres and your app on Prisma Compute.

47.8k
Nov 29, 2026
RepositoryJavaScript
drawdb-io/drawdb

Free, simple, and intuitive online database diagram editor and SQL generator.

40.5k
Nov 29, 2026
RepositoryTypeScript
directus/directus

The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.

38.8k
Dec 1, 2026
RepositoryTypeScript
sequelize/sequelize

Feature-rich ORM for modern Node.js and TypeScript, it supports PostgreSQL (with JSON and JSONB support), MySQL, MariaDB, SQLite, MS SQL Server, Snowflake, Oracle DB, DB2 and DB2 for IBM i.

30.3k
Nov 21, 2026
RepositoryTypeScript
chartdb/chartdb

Database diagrams editor that allows you to visualize and design your DB with a single query.

23.2k
Nov 1, 2026
RepositoryTypeScript
nocodb/nocodb

🔥 🔥 🔥 A Free & Self-hostable Airtable Alternative

65.7k
Nov 30, 2026