Skip to content

abrisan/libtrino

Repository files navigation

libtrino

Status: In Development

An (attempt) at a Trino connection library for C++.

This project is built using CMake and it is has the following open-soruce dependencies:

  • cpr An awesome C++ requests library, modelled on the Python requests package
  • nlohmann::json An awesome, easy to use JSON library for C++

Code Sample

This is how you can run a simple query:

#include <iostream>

#include "abrisan/trino/Connection.h"

using namespace abrisan;

int main() {
    trino::Connection connection("localhost", 8080, trino::Scheme::HTTP, {}, "abrisan1");
    trino::Result result;
    connection.execute("SHOW CATALOGS", result);
    std::cout << result["Catalog"] << std::endl;
    return 0;
}

Running Tests

You can run the tests using docker, by running docker-compose run test

Development Environment

You should be able to open this project using CLion and develop with it.

Stay tuned for more updates!

About

C++ client library for Trino

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages