Skip to content

rupurt/zodbc

Repository files navigation

zodbc

A blazing fast ODBC Zig client

> zodbc -h
zodbc

USAGE:
  zodbc [OPTIONS]

COMMANDS:
  sql
  dump
  load
  tables
  table-privileges
  columns
  column-privileges
  special-columns
  primary-keys
  foreign-keys
  statistics
  data-sources
  functions
  procedures
  procedure-columns
  info
  attrs
  benchmark

OPTIONS:
  -h, --help   Prints help information

Goals

  • Fastest ODBC C ABI client library for bulk load/unload
  • Kernel thread worker pool concurrency per ODBC connection
  • High level Zig bindings
  • ODBC row & column bindings
  • ODBC Zig bindings
  • ODBC to Arrow record batch reader/writer
  • ODBC zero copy C ABI
  • High level C ABI
  • Expose all ODBC API's
  • Database benchmarks
  • Python bindings
  • Elixir bindings
  • Java bindings
  • .NET bindings

Getting Started

Usage

  1. Add zodbc as a dependency in your build.zig.zon
.{
    .name = "<name_of_your_package>",
    .version = "<version_of_your_package>",
    .dependencies = .{
        .zodbc = .{
            .url = "https://github.com/rupurt/zodbc/archive/<git_tag_or_commit_hash>.tar.gz",
            .hash = "<package_hash>",
        },
    },
}

Set <package_hash> to 12200000000000000000000000000000000000000000000000000000000000000000, and Zig will provide the correct found value in an error message.

  1. Add zodbc as a dependency module in your build.zig
// ...
const zodbc_dep = b.dependency("zodbc", .{ .target = target, .optimize = optimize });
exe.root_module.addImport("zodbc", zodbc_dep.module("zodbc"));

Development

> nix develop -c $SHELL
> make
> make test
> make run
> make clean
> make build
> make run -- -h
> make run -- sql -h
...
> make exec -- -h
> make exec -- sql -h
> make compose.up
> make compose.down

License

zodbc is released under the MIT license

Releases

No releases published

Packages

No packages published

Languages