Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for directly providing ODBC DNS #28

Closed
wants to merge 68 commits into from

Commits on Jan 27, 2015

  1. Support for directly providing ODBC DNS

    A new way of using the env.connect method, providing a table of options.
    
    In this case, the old method can now be used as:
    env.connect{ user = "foo", password = "bar", source = "My DB DSN from odbcad32" }
    
    But also, a DSN can be provided:
    env.connect{ dsn = [[DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};PWD=bar;DBQ=C:\path\my_db.mdb]] }
    blumf committed Jan 27, 2015
    Configuration menu
    Copy the full SHA
    83992a4 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2015

  1. Configuration menu
    Copy the full SHA
    0a69e30 View commit details
    Browse the repository at this point in the history
  2. Update README

    Changed readme file to match project's intentions and use markdown
    blumf committed Apr 9, 2015
    Configuration menu
    Copy the full SHA
    2ab1e68 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2ce67ee View commit details
    Browse the repository at this point in the history
  4. New table helper functions

    Just some stuff to save typing when pulling info from tables
    blumf committed Apr 9, 2015
    Configuration menu
    Copy the full SHA
    c300729 View commit details
    Browse the repository at this point in the history
  5. Avoided use of strcpy and sprintf

    Mainly just to shut up MSVC compiler
    blumf committed Apr 9, 2015
    Configuration menu
    Copy the full SHA
    0c06ede View commit details
    Browse the repository at this point in the history
  6. Convert Firebird driver to use table for connection

    Firebird driver now uses connection info table for opening up
    connections. Next step will involve adding support for optional
    parameters
    blumf committed Apr 9, 2015
    Configuration menu
    Copy the full SHA
    2a65a4b View commit details
    Browse the repository at this point in the history
  7. All drivers use same table

    When requiring a driver, it will search for other LuaSQL drivers already
    loaded and use that table to place their environment function in. i.e.
    
    ```
    luasql = require"luasql.odbc"
    luasql = require"luasql.mysql"
    ```
    
    Results in both drivers being available via the luasql table
    blumf committed Apr 9, 2015
    Configuration menu
    Copy the full SHA
    3e6a06e View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2015

  1. Connect now supports 'charset'

    Connection charset can now be selected for Firebird, defaults to 'UTF8'
    blumf committed Apr 10, 2015
    Configuration menu
    Copy the full SHA
    862be2a View commit details
    Browse the repository at this point in the history
  2. Document change in comment

    blumf committed Apr 10, 2015
    Configuration menu
    Copy the full SHA
    c4a5d2f View commit details
    Browse the repository at this point in the history
  3. Renamed functions to avoid confusion

    These may end up in the wider LuaSQL API, plus their current name made
    them look like official Lua API
    blumf committed Apr 10, 2015
    Configuration menu
    Copy the full SHA
    342e875 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2015

  1. Firebird driver supports basic prepared statements

    Mass of refactoring and other work, but the Firebird driver now has
    prepared statements.
    No ability to set parameters yet though.
    blumf committed Apr 11, 2015
    Configuration menu
    Copy the full SHA
    e3d3898 View commit details
    Browse the repository at this point in the history
  2. Firebird SQL dialect config

    Now specify the SQL dialect via a connection parameter
    blumf committed Apr 11, 2015
    Configuration menu
    Copy the full SHA
    2be82a8 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2015

  1. Protecting against buffer overrun

    Avoid potential buffer overrun from connection parameters
    blumf committed Apr 15, 2015
    Configuration menu
    Copy the full SHA
    7aa596e View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2015

  1. Execute now accepts parameters

    Both connection and statement objects now accept parameters being passed
    to their execute method
    blumf committed Apr 16, 2015
    Configuration menu
    Copy the full SHA
    cffa10b View commit details
    Browse the repository at this point in the history
  2. Proper cursor handling

    Handling of cursor state and it's relation to statements is laid out
    properly
    blumf committed Apr 16, 2015
    Configuration menu
    Copy the full SHA
    9327b23 View commit details
    Browse the repository at this point in the history
  3. Proper statement handling

    Statements now check if any open cursors are depending on it and
    properly releases itself from the connection
    blumf committed Apr 16, 2015
    Configuration menu
    Copy the full SHA
    b4fd2b4 View commit details
    Browse the repository at this point in the history
  4. Close none cursor statements

    Close statements on conn:execute when they don't return cursors
    Also some minor fixes/tidy
    blumf committed Apr 16, 2015
    Configuration menu
    Copy the full SHA
    507fe0c View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2015

  1. Using unambiguous date format

    Convert date stamps to unambiguous YYYY-MM-DD format also supported by
    Firebird (e.g. value can be passed as a param)
    blumf committed Apr 17, 2015
    Configuration menu
    Copy the full SHA
    36b6a08 View commit details
    Browse the repository at this point in the history
  2. Parameters now take os.time values

    As well as timestamp strings, parameters can handle values returned from
    os.time()
    blumf committed Apr 17, 2015
    Configuration menu
    Copy the full SHA
    5b79d90 View commit details
    Browse the repository at this point in the history
  3. Neaten up parameter fill code

    Too much repetition of code, slimmed it down
    blumf committed Apr 17, 2015
    Configuration menu
    Copy the full SHA
    65bfb3d View commit details
    Browse the repository at this point in the history
  4. Force close of statements used internally

    When a cursor created from a direct con:execute call closes, the
    associated statement wasn't closed until garbage collection. Now
    flagging those internal statements so they can be forced closed with the
    cursor
    blumf committed Apr 17, 2015
    Configuration menu
    Copy the full SHA
    f405cb8 View commit details
    Browse the repository at this point in the history
  5. Using uchar for holding bool value

    Didn't make much sense to use a short just to hold a bool value (and
    can't rely on <stdbool.h> existing)
    blumf committed Apr 17, 2015
    Configuration menu
    Copy the full SHA
    7a709dc View commit details
    Browse the repository at this point in the history
  6. Scratch prev commit

    Forgot luasql_tostring relies on the layout of the structs starting with
    short
    blumf committed Apr 17, 2015
    Configuration menu
    Copy the full SHA
    2e20062 View commit details
    Browse the repository at this point in the history
  7. Unified a bunch of memory code

    Reducing the line count
    blumf committed Apr 17, 2015
    Configuration menu
    Copy the full SHA
    2a4a816 View commit details
    Browse the repository at this point in the history
  8. Merge branch 'upstream/master'

    blumf committed Apr 17, 2015
    Configuration menu
    Copy the full SHA
    2eb89ba View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2015

  1. Tidied up ODBC's env:connect functions

    Neater layout to the ODBC driver's connect function
    blumf committed Apr 20, 2015
    Configuration menu
    Copy the full SHA
    1bb7db1 View commit details
    Browse the repository at this point in the history
  2. Create concept of statements

    Opening up the struct and metatable for statements in ODBC
    blumf committed Apr 20, 2015
    Configuration menu
    Copy the full SHA
    fc1ac8b View commit details
    Browse the repository at this point in the history
  3. Format tidy up

    Mainly always use braces
    blumf committed Apr 20, 2015
    Configuration menu
    Copy the full SHA
    8af1e32 View commit details
    Browse the repository at this point in the history
  4. Move (un)registerobj functions into wider library

    Was used just in Firebird driver, now available for the whole package
    blumf committed Apr 20, 2015
    Configuration menu
    Copy the full SHA
    f7f9169 View commit details
    Browse the repository at this point in the history
  5. Using more direct locking

    Lock via pointer so we don't need to also keep ref numbers
    blumf committed Apr 20, 2015
    Configuration menu
    Copy the full SHA
    cb62a5e View commit details
    Browse the repository at this point in the history
  6. Added con:prepare function

    Creates a statement object
    blumf committed Apr 20, 2015
    Configuration menu
    Copy the full SHA
    67ba726 View commit details
    Browse the repository at this point in the history
  7. Fixed stmt:close

    Also bug in env:connect wasn't returning proper item
    blumf committed Apr 20, 2015
    Configuration menu
    Copy the full SHA
    8b82654 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2015

  1. Split up ODBC execution steps

    Ready to be used by both conn:execute and stmt:execute
    blumf committed Apr 21, 2015
    Configuration menu
    Copy the full SHA
    1a434d7 View commit details
    Browse the repository at this point in the history
  2. ODBC stmt:execute now runs

    Next step, params
    blumf committed Apr 21, 2015
    Configuration menu
    Copy the full SHA
    fbb6245 View commit details
    Browse the repository at this point in the history
  3. ODBC stmt:getparamtypes function support

    But, most ODBC drivers do not support SQLDescribeParam, so this won't
    work in most cases.
    blumf committed Apr 21, 2015
    Configuration menu
    Copy the full SHA
    fc220a5 View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2015

  1. Tidy up recent code changes

    blumf committed Apr 22, 2015
    Configuration menu
    Copy the full SHA
    3dd893e View commit details
    Browse the repository at this point in the history
  2. First stab at ODBC parameter binding

    It's trickier than it should be because we can't rely on
    SQLDescribeParam to be working so it's just forcing the types to
    whatever the Lua type is
    blumf committed Apr 22, 2015
    Configuration menu
    Copy the full SHA
    f6ee06d View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2015

  1. ODBC con:execute now accepts parameters

    Nice and easy
    blumf committed Apr 23, 2015
    Configuration menu
    Copy the full SHA
    bc252b2 View commit details
    Browse the repository at this point in the history
  2. ODBC supports NULL & bool params

    NULL wasn't working, bool is new
    blumf committed Apr 23, 2015
    Configuration menu
    Copy the full SHA
    4d90417 View commit details
    Browse the repository at this point in the history
  3. Moved luasql_pushinteger into wider project

    Using the luasql_ prefix to make clear it's a backward compat patch
    blumf committed Apr 23, 2015
    Configuration menu
    Copy the full SHA
    6f41ec6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0e770ca View commit details
    Browse the repository at this point in the history
  5. ODBC Cursor now closes itself when out of results

    This behaviour matches the documentation
    blumf committed Apr 23, 2015
    Configuration menu
    Copy the full SHA
    22cebe4 View commit details
    Browse the repository at this point in the history
  6. Better method to fix old connection calls

    Bit more flexible and clear, should be a quick copy/paste for other
    drivers
    blumf committed Apr 23, 2015
    Configuration menu
    Copy the full SHA
    210e800 View commit details
    Browse the repository at this point in the history
  7. Function in wrong place

    Was written after it's calling function
    blumf committed Apr 23, 2015
    Configuration menu
    Copy the full SHA
    d6b8f1a View commit details
    Browse the repository at this point in the history
  8. MySQL driver supports new env:connect style

    Connection details table support in
    blumf committed Apr 23, 2015
    Configuration menu
    Copy the full SHA
    9241007 View commit details
    Browse the repository at this point in the history
  9. Tidy up some compiler warnings

    blumf committed Apr 23, 2015
    Configuration menu
    Copy the full SHA
    e4e14f4 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2015

  1. Ran file through beautifier

    Using the following command:
    astyle --style=1tbs --indent=tab=5 --align-pointer=name --align-reference=name --max-code-length=80 --lineend=linux ls_firebird.c
    Then tidied up a bit
    blumf committed Apr 25, 2015
    Configuration menu
    Copy the full SHA
    d8702e4 View commit details
    Browse the repository at this point in the history
  2. Ran file through beautifier

    Using the following command:
    astyle --style=1tbs --indent=tab=5 --align-pointer=name --align-reference=name --max-code-length=80 --lineend=linux ls_firebird.c
    Then tidied up a bit
    blumf committed Apr 25, 2015
    Configuration menu
    Copy the full SHA
    be804c6 View commit details
    Browse the repository at this point in the history
  3. Ran file through beautifier

    Using the following command:
    astyle --style=1tbs --indent=tab=5 --align-pointer=name --align-reference=name --max-code-length=80 --lineend=linux ls_mysql.c
    Then tidied up a bit
    blumf committed Apr 25, 2015
    Configuration menu
    Copy the full SHA
    87e0475 View commit details
    Browse the repository at this point in the history
  4. Using C99 for now

    Not 100% on this, ideally we'd want the lowest common denominator, but for now it avoids some warnings (e.g. no 'long long' and 'snprintf' support in plain ANSI)
    Also bumped the version in the makefile to 3.0.0
    blumf committed Apr 25, 2015
    Configuration menu
    Copy the full SHA
    4edf87b View commit details
    Browse the repository at this point in the history
  5. Ran file through beautifier

    astyle --style=1tbs --indent=tab=5 --align-pointer=name --align-reference=name --max-code-length=80 --lineend=linux ls_sqlite.c ls_sqlite3.c
    blumf committed Apr 25, 2015
    Configuration menu
    Copy the full SHA
    721822f View commit details
    Browse the repository at this point in the history
  6. More tidying

    Plus, making sure the Firebird drive compiles under Linux
    blumf committed Apr 25, 2015
    Configuration menu
    Copy the full SHA
    4f39b91 View commit details
    Browse the repository at this point in the history
  7. Created statement object for MySQL driver

    Basic struct and metadata entries
    blumf committed Apr 25, 2015
    Configuration menu
    Copy the full SHA
    2c99c56 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2015

  1. Sorted out differences between driver reg on 5.1/5.3

    There are different ways to register libs on Lua between 5.1 and 5.3.
    Lua 5.1 support is handy because LuaJIT stuck with the 5.1 API
    blumf committed Apr 27, 2015
    Configuration menu
    Copy the full SHA
    1a6e57a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    66d924d View commit details
    Browse the repository at this point in the history

Commits on Apr 30, 2015

  1. ODBC function to list available drivers

    Handy to be able to find out what's available to use
    blumf committed Apr 30, 2015
    Configuration menu
    Copy the full SHA
    81eb6c1 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2015

  1. More tidying

    blumf committed May 2, 2015
    Configuration menu
    Copy the full SHA
    817e8ad View commit details
    Browse the repository at this point in the history

Commits on May 3, 2015

  1. Configuration menu
    Copy the full SHA
    f077127 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'MySQL_WIP'

    blumf committed May 3, 2015
    Configuration menu
    Copy the full SHA
    76c4cc3 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2015

  1. Added includes to luasql.h

    Technically these should been here for the function decs
    blumf committed May 4, 2015
    Configuration menu
    Copy the full SHA
    c5ad4a3 View commit details
    Browse the repository at this point in the history
  2. Improved *nix makefile

    The old version was a bit clunky; required editing the config file to
    compile different drivers, and didn't support passing alt parameters
    (include/lib dirs) from the command line.
    blumf committed May 4, 2015
    Configuration menu
    Copy the full SHA
    0a2c974 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2015

  1. Configuration menu
    Copy the full SHA
    28f3b3e View commit details
    Browse the repository at this point in the history

Commits on May 7, 2015

  1. MySQL now uses statements directly

    Compiles but untested
    blumf committed May 7, 2015
    Configuration menu
    Copy the full SHA
    e484b48 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2015

  1. Wasn't creating a new connection object

    Mistake from prev commit
    blumf committed May 8, 2015
    Configuration menu
    Copy the full SHA
    60d2635 View commit details
    Browse the repository at this point in the history
  2. Removed unused var

    blumf committed May 8, 2015
    Configuration menu
    Copy the full SHA
    66bbede View commit details
    Browse the repository at this point in the history

Commits on May 26, 2015

  1. Merge branch 'master' of https://github.com/keplerproject/luasql

    Conflicts:
    	src/ls_mysql.c
    blumf committed May 26, 2015
    Configuration menu
    Copy the full SHA
    8d45355 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2015

  1. Platform agnostic column buffers

    Issues with integer sizes differing between 32 & 64-bit archs
    (same as committed to Kepler root, but the code is far to different to merge now)
    blumf committed Jul 31, 2015
    Configuration menu
    Copy the full SHA
    2900df6 View commit details
    Browse the repository at this point in the history