<commit_before># erloci - An Erlang driver for the Oracle Call Interface

[![Build Status](https://travis-ci.org/K2InformaticsGmbH/erloci.svg?branch=master)](https://travis-ci.org/K2InformaticsGmbH/erloci) [![Coverage Status](https://coveralls.io/repos/github/K2InformaticsGmbH/erloci/badge.svg?branch=master)](https://coveralls.io/github/K2InformaticsGmbH/erloci?branch=master)

### Users
<a href="http://www.k2informatics.ch/">
  <img src="http://www.k2informatics.ch/logo.gif" alt="K2 Informatics GmbH">
</a>
<a href="http://privatbank.ua/">
  <img src="https://privatbank.ua/favicon.ico" alt="Privat Bank, Ukraine">
</a>

### Setup the development system
Create a environment variable OTPROOT pointing to erlang installation directory,
e.g. - in linux (if installed from RPM) its usually /usr/lib/erlang.
Download from [Oracle](http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html) the following libraries (for matching os and platfrom for the development system)
  1. instantclient-basic
  2. instantclient-sdk

### Windows
Unzip both into a directory and create the following enviroment variable
E.g. - if your instant client library version is 12.1 and you have unzipped 'instantclient-basic-windows*.zip' to C:\Oracle\instantclient\instantclient_12_1 then the sdk should be at C:\Oracle\instantclient\instantclient_12_1\sdk\
The include headers will be at C:\Oracle\instantclient\instantclient_12_1\sdk\include and static libraries at C:\Oracle\instantclient\instantclient_12_1\sdk\lib\msvc (note the path for VS project configuration later)

### Linux / Mac OS X
Required system libraries
```
libevent
libevent-devel
```
Use rpms (recomended) to install basic and sdk. The default install path is usually (for x86_64 architecture)
For Mac you may use Homebrew (http://brew.sh) as package manager to install it.
```
OCI Headers     : /usr/include/oracle/12.1/client64/
OCI Libraries   : /usr/lib/oracle/12.1/client64/lib/
```

### Create Environment variables
```
INSTANT_CLIENT_LIB_PATH     = path to oci libraries
INSTANT_CLIENT_INCLUDE_PATH = path to oci headers
ERL_INTERFACE_DIR           = path to erl_interface or erlang installation
```

For example:
```
(x64 Fedora)
INSTANT_CLIENT_LIB_PATH     = /usr/lib/oracle/12.1/client64/lib/
INSTANT_CLIENT_INCLUDE_PATH = /usr/include/oracle/12.1/client64/
ERL_INTERFACE_DIR           = /usr/lib64/erlang/lib/erl_interface-3.7.15


(x64 Windows 7)
INSTANT_CLIENT_LIB_PATH     = C:\Oracle\instantclient\instantclient_12_1\
ERL_INTERFACE_DIR           = C:\Program Files\erlang\erl5.10.4\lib\erl_interface-3.7.15
```

### Ubuntu (14.04.2 LTS 'trusty')
```<commit_msg>erlang oci library version upgrade proof path<commit_after># erloci - An Erlang driver for the Oracle Call Interface

[![Build Status](https://travis-ci.org/K2InformaticsGmbH/erloci.svg?branch=master)](https://travis-ci.org/K2InformaticsGmbH/erloci) [![Coverage Status](https://coveralls.io/repos/github/K2InformaticsGmbH/erloci/badge.svg?branch=master)](https://coveralls.io/github/K2InformaticsGmbH/erloci?branch=master)

### Users
<a href="http://www.k2informatics.ch/">
  <img src="http://www.k2informatics.ch/logo.gif" alt="K2 Informatics GmbH">
</a>
<a href="http://privatbank.ua/">
  <img src="https://privatbank.ua/favicon.ico" alt="Privat Bank, Ukraine">
</a>

### Setup the development system
Create a environment variable OTPROOT pointing to erlang installation directory,
e.g. - in linux (if installed from RPM) its usually /usr/lib/erlang.
Download from [Oracle](http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html) the following libraries (for matching os and platfrom for the development system)
  1. instantclient-basic
  2. instantclient-sdk

### Windows
Unzip both into a directory and create the following enviroment variable
E.g. - if your instant client library version is 12.1 and you have unzipped 'instantclient-basic-windows*.zip' to C:\Oracle\instantclient\instantclient_12_1 then the sdk should be at C:\Oracle\instantclient\instantclient_12_1\sdk\
The include headers will be at C:\Oracle\instantclient\instantclient_12_1\sdk\include and static libraries at C:\Oracle\instantclient\instantclient_12_1\sdk\lib\msvc (note the path for VS project configuration later)

### Linux / Mac OS X
Required system libraries
```
libevent
libevent-devel
```
Use rpms (recomended) to install basic and sdk. The default install path is usually (for x86_64 architecture)
For Mac you may use Homebrew (http://brew.sh) as package manager to install it.
```
OCI Headers     : /usr/include/oracle/12.1/client64/
OCI Libraries   : /usr/lib/oracle/12.1/client64/lib/
```

### Create Environment variables
```
INSTANT_CLIENT_LIB_PATH     = path to oci libraries
INSTANT_CLIENT_INCLUDE_PATH = path to oci headers
ERL_INTERFACE_DIR           = path to erl_interface or erlang installation
```
Example `.bashrc` snippet:
```sh
...
INSTANT_CLIENT_LIB_PATH=$(find /usr/lib/oracle/ -type d -name client64)/lib
INSTANT_CLIENT_INCLUDE_PATH=$(find /usr/include/oracle/ -type d -name client64)
ERL_INTERFACE_DIR=$(find /usr/lib/erlang/lib/ -type d -name erl_interface-*)

export INSTANT_CLIENT_LIB_PATH
export INSTANT_CLIENT_INCLUDE_PATH
export ERL_INTERFACE_DIR
...
```

For example:
```
(x64 Fedora)
INSTANT_CLIENT_LIB_PATH     = /usr/lib/oracle/12.1/client64/lib/
INSTANT_CLIENT_INCLUDE_PATH = /usr/include/oracle/12.1/client64/
ERL_INTERFACE_DIR           = /usr/lib64/erlang/lib/erl_interface-3.7.15


(x64 Windows 7)
INSTANT_CLIENT_LIB_PATH     = C:\Oracle\instantclient\instantclient_12_1\
ERL_INTERFACE_DIR           = C:\Program Files\erlang\erl5.10.4\lib\erl_interface-3.7.15
```

### Ubuntu (14.04.2 LTS 'trusty')
```
{'fraction_non_alphanumeric': 0.12084063047285463, 'fraction_numerical': 0.02907180385288967, 'mean_word_length': 4.6600594648166505, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 10, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1101348', 'n_tokens_mistral': 2071, 'n_tokens_neox': 1892, 'n_words': 466}