GithubHelp home page GithubHelp logo

cowsdb / libcows Goto Github PK

View Code? Open in Web Editor NEW
28.0 4.0 0.0 220 KB

Library builder for CowsDB, a non-commercial, community powered chdb/ClickHouse embedded alternative.

License: GNU Affero General Public License v3.0

C++ 4.94% Shell 68.00% C 27.06%
chdb dynamic-library library clickhouse clickhouse-database serverless clickhouselib binding clickhouse-server embedded-database

libcows's Introduction

Build Status

libCows

Independent builder generating a stable chdb compatible library binding for C/C++/Go/Rust/Node/Bun/etc


Features

  • In-process SQL OLAP Engine, powered by chdb/ClickHouse
  • Library only designed for native bindings and integrations
  • Compatible with chdb bindings without python obsession.
  • Same source code and featureset as chdb/ClickHouse.

๐Ÿ“ฆ Installation

Install libcows manually on x64 or arm64 Linux platforms:

Linux

๐Ÿ“ฆ x86_64
wget https://github.com/cowsdb/libcows/releases/latest/download/libcows.zip
unzip libcows.zip
mv libcows.so /usr/lib/libcows.so
๐Ÿ“ฆ arm64
wget https://github.com/cowsdb/libcows/releases/latest/download/libcows_arm64.zip
unzip libcows_arm64.zip
mv libcows.so /usr/lib/libcows.so

Packages

Install libcows on any deb or rpm based operating system:

๐Ÿ“ฆ Debian Repository (x64/arm64)
wget -q -O - https://cowsdb.github.io/libcows_installer.sh | sudo bash
sudo apt install libcows
๐Ÿ“ฆ RPM Repository (x64/arm64)
wget -q -O - https://cowdb.github.io/libcows_installer.sh | sudo bash
sudo yum install -y libcows

:octocat: Usage

A basic libcows usage example is included with this repository:

cd example
./run.sh

๐Ÿšง: Project Status

  • patch builder, bypass python bindings
  • package library as deb, rpm
  • host package repository on github pages/actions
  • arm64 library support
  • header files and examples
  • split from chdb-io after they used us up

libcows's People

Contributors

lmangani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

libcows's Issues

Static build

Is a static library.a build even possible, and at what cost? Let's f around and find out in this thread.

arm64: cannot allocate memory in static TLS block

The arm64 builds of libchdb.so are succeeding without errors, but library invocations fail

libchdb.so: cannot allocate memory in static TLS block

Not sure if this can/should be solved at build stage or with include changes. Any Help welcome!

UDF Functions

The upcoming releases of ClickHouse allow correct allocation of UDF resources with two new parameters:

  • user_scripts_path
  • user_defined_executable_functions_config
#!/usr/bin/env bash

set -e

CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CUR_DIR"/../shell_config.sh

SCRIPTS_DIR=$CUR_DIR/scripts_udf

$CLICKHOUSE_LOCAL -q 'select test_function()' -- --user_scripts_path=$SCRIPTS_DIR --user_defined_executable_functions_config=$SCRIPTS_DIR/function.xml

This will finally allow using the execute binary UDF functions in chDB:

SELECT * FROM executable('./some_script.py', TabSeparated, 'name String', (SELECT name));

Todo

  • Backport functions chdb chdb-io/chdb#81
  • Add support for the new parameters in the chdb session binding to leverage this functionality ๐Ÿ˜ƒ

Full API

Hi,
I am working on Go bindings for the chdb, and I was wondering where can I find the API definition provided by the shared library. What is in libchdb.h seems to be incomplete.

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.