GithubHelp home page GithubHelp logo

sqdbcpp's People

Watchers

 avatar

sqdbcpp's Issues

sqlite3_open_v2 only supported starting with 3.5.0

What steps will reproduce the problem?
1. Compile with sqlite3 version < 3.5.0 installed

What is the expected output? What do you see instead?
Compiler error about sqlite3_open_v2 being undefined

What version of the product are you using? On what operating system?
I am on CentOS but it does not matter.  This is an issue with the SQLite 
library version.

git log says:
commit af1718a8f315c4e5c4294322d7be0eb758444143
Author: Wongoo Lee
Date:   Fri May 25 10:24:55 2012 -0700


Please provide any additional information below.

See SQLite 3.5.0 release notes at http://www.sqlite.org/34to35.html

The solution is to wrap the sqlite3pp::database::connect_v2 declaration and 
definition like this:

// sqlite3pp.h ~line 67
#if SQLITE_VERSION_NUMBER >= 3005000    // sqlite3_open_v2 not available until 
sqlite 3.5.0
    int connect_v2(char const* dbname, int flags, char const* vfs = 0);
#endif


// sqlite3pp.cpp ~line 93
#if SQLITE_VERSION_NUMBER >= 3005000    // sqlite3_open_v2 not available until 
sqlite 3.5.0
  int database::connect_v2(char const* dbname, int flags, char const* vfs)
  {
    disconnect();

    return sqlite3_open_v2(dbname, &db_, flags, vfs);
  }
#endif

You could, of course, decide to simply call connect from connect_v2 in the case 
that SQLite is not the right version.  However, this seems more risky since, 
presumably, the caller wanted to use the extended features of the v2 interface. 
 I think it is better to let the library user make the decision explicitly.


Original issue reported on code.google.com by [email protected] on 2 Aug 2012 at 11:59

Contributing code?

I've got some minor tweaks and stuff, would like to contribute but have no way 
to contact the author...  

Original issue reported on code.google.com by [email protected] on 3 Apr 2012 at 3:38

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.