3 Star 0 Fork 0

Gitee 极速下载 / trilogy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/github/trilogy
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Trilogy

Trilogy is a client library for MySQL-compatible database servers, designed for performance, flexibility, and ease of embedding.

It's currently in production use on github.com.

Features

  • Supports the most frequently used parts of the text protocol

    • Handshake
    • Password authentication
    • Query, ping, and quit commands
  • Support prepared statements (binary protocol)

  • Low-level protocol API completely decoupled from IO

  • Non-blocking client API wrapping the protocol API

  • Blocking client API wrapping the non-blocking API

  • No dependencies outside of POSIX, the C standard library & OpenSSL

  • Minimal dynamic allocation

  • MIT licensed

Limitations

  • Only supports the parts of the text protocol that are in common use.

  • No support for LOAD DATA INFILE on local files

  • trilogy_escape assumes an ASCII-compatible connection encoding

Building

make - that's it. This will build a static libtrilogy.a

Trilogy should build out of the box on most UNIX systems which have OpenSSL installed.

API Documentation

Documentation for Trilogy's various APIs can be found in these header files:

  • blocking.h

    The blocking client API. These are simply a set of convenient wrapper functions around the non-blocking client API in client.h

  • client.h

    The non-blocking client API. Every command is split into a _send and _recv function allowing callers to wait for IO readiness externally to Trilogy

  • builder.h

    MySQL-compatible packet builder API

  • charset.h

    Character set and encoding tables

  • error.h

    Error table. Every Trilogy function returning an int uses the error codes defined here

  • packet_parser.h

    Streaming packet frame parser

  • protocol.h

    Low-level protocol API. Provides IO-decoupled functions to parse and build packets

  • reader.h

    Bounds-checked packet reader API

Bindings

We maintain a Ruby binding in this repository. This is currently stable and production-ready.

License

Trilogy is released under the MIT license.

Copyright (c) 2012-2021 GitHub, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Trilogy 是用于兼容 MySQL 的数据库服务器的客户端库,专为性能、灵活性和易于嵌入而设计 展开 收起
C/C++ 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C/C++
1
https://gitee.com/mirrors/trilogy.git
git@gitee.com:mirrors/trilogy.git
mirrors
trilogy
trilogy
main

搜索帮助