Giter Club home page Giter Club logo

oraq's Introduction

Oraq

An oracle driver for q. [email protected]

Overview

If you can connect to your oracle server via sqlplus, oraq will too. Oraq is currently targeted at linux 64bit users:

As a prerequisite, sqlplus must be installed and connect to your oracle server. Sqlplus can be installed by installing the Oracle Instant Client

Linking

ora.so is produced by linking oraq.o with oracle's clntsh and nnz12. eg:

ld -shared oraq.o -oora.so -L/home/jack/o/instantclient_12_2 -l:libclntsh.so.12.1 -lnnz12

You can find the -L directory and the libclntsh.so version using ldd on sqlplus:

$ ldd `which sqlplus`
    ...
    libclntsh.so.12.1 => /home/jack/o/instantclient_12_2/libclntsh.so.12.1 (0x00007fa119ee2000)
    ...
    libnnz12.so => /home/jack/o/instantclient_12_2/libnnz12.so (0x00007fa118b21000)
    ...

Running

If necessary, check the connection to oracle using sqlplus. eg

$ sqlplus scott/tiger@localhost/XE
> Ctrl-D

replacing scott, tiger and localhost/XE with your authorization and dblink.

Run test.q:

$ q test.q -user scott -pass tiger -link localhost/XE
KDB+ 3.5 2017.11.08 Copyright (C) 1993-2017 Kx Systems
l64/ 4(16)core 6935MB ...

a b   c      d                            
------------------------------------------
0 3.1 a      2018.07.01D00:00:00.000000000
1 3.2
2 3.3 symbol 2018.07.01D12:00:20.000000000

test.q

  • creates and populates the table x in oracle using .ora.p
  • retrieves x from oracle using .ora.t and compares with the original
  • drops the table to tidy up

Tuning

  • set .ora.fz to the number of rows to fetch at a time. (it's set at a low value initially)

oraq's People

Contributors

jfakx avatar effbiae avatar

Watchers

James Cloos avatar

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.