Skip to content

DerbyPy/what-is-odbc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purpose

Explore the internals of ODBC

What is ODBC?

ODBC is a specification for a database API creating a standard way for applications to interact with various databases via a series of translation and application layers. It is independent of any specific database, language or operating system.

Architecture

         Application Layer 
       (Python in this repo)
                |
                |
                |
      ODBC API Language Wrapper 
        (PyODBC for this repo)
                |
                |
                |
         Driver Manager 
      (unixODBC + odbcinst.ini)
                |
                |
                |
            ODBC Driver 
      (referenced in odbc.ini)
                |
                |
                |
             Database
(Postgres and SQL Server for this repo)

Instructions

Install ODBC driver manager

brew install unixODBC

Install ODBC drivers

brew install psqlodbc
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew update
brew install msodbcsql17 mssql-tools

Configure ODBC connections

odbcinst -j
vim odbcinst.ini
vim odbc.ini

Pull the repo

git pull https://gitlab.com/AlexHagerman/what-is-odbc

Confirm connection settings

docker-compose -f stack.yml up -d
isql -v MSSQLDockerODBCDemo SA d3m0p@ssw0rd
select top 1 * from information_schema.columns;
quit

Explore ODBC with Python

poetry install
CFLAGS='-Wall -O0 -g' python setup.py build
lldb -f python -- -m pdb main.py

breakpoint set --file connection.cpp --line 232
breakpoint set --file connection.cpp --line 52
breakpoint set --file cursor.cpp --line 1100
breakpoint set --file getdata.cpp --line 776

run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published