Giter VIP home page Giter VIP logo

trilogy's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.