An experiment to fetch some data from Oracle DB using ODPI-C thin API
- Oracle Instant Client
- odpi (install with
brew install odpi
) - Swift 4.2 or newer
swift build -Xlinker -L/usr/local/lib
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