Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 659 Bytes

README.md

File metadata and controls

38 lines (28 loc) · 659 Bytes

An experiment to fetch some data from Oracle DB using ODPI-C thin API

Requirements

  • Oracle Instant Client
  • odpi (install with brew install odpi)
  • Swift 4.2 or newer

Build

swift build -Xlinker -L/usr/local/lib

Run the example

Example expects connection parameters put into config.json file,

{
    "database": {
        "connection": "<connection string>",
        "username": "<uname>",
        "password": "<passwd>"
    }
}

Copy / link libclntsh.dylib library isto /usr/local/lib. Now start the code with the following command.

swift run -Xlinker -L/usr/local/lib