Updated version to 1.0.0 changelog and copyright date

This commit is contained in:
Sébastien Rombauts 2015-05-03 22:56:21 +02:00
parent e537195625
commit 09db07ccc7
12 changed files with 61 additions and 48 deletions

View File

@ -41,6 +41,19 @@ Version 0.7.0 - January 9 2014
Added std::string version of existing APIs
Improved CMake with more build options and Doxygen auto-detection
Version 0.8.0 - Februrary 26 2014
Version 0.8.0 - February 26 2014
Database constructor support opening a database with a custom VFS (default to NULL)
Changed Column::getText() to return empty string "" by default instead of NULL pointer (to handle std::string conversion)
Version 1.0.0 - pending May 2015
Public headers file moved to include/ dir
Added support to biicode in CMakeLists.txt
Added Unit Tests
Added a aBusyTimeoutMs parameter to Database() constructors
Added a Database::getTotalChanges()
Added a Database::getErrorCode()
Added a Statement::clearBindings()
Added a Statement::getColumn(aName)
Added a Statement::getErrorCode()
Added a Statement::getColumnName(aIndex)
Added a Statement::getColumnOriginName(aIndex)

View File

@ -1,24 +1,23 @@
Add a full googletest suite
Add a Tutorial: for SQLite newbies
Create Github Wiki pages with the README.md and FAQ.txt: Installation, Examples, Tutorial, How to contribute
Publish a versionned ZIP file in Google Project Mirror
Improve Github Wiki pages with the FAQ: Installation, Examples, Tutorial, How to contribute
Publish the Doxygen Documentation in the Github Pages (gh-pages branch)
Missing features in v0.9.9:
- getColumnByName() (issue #23) ? std::map getRow() ?
Missing features in v1.0.0:
- bind a SQLITE_STATIC value (string/blob)
- bind a dynamic value with zerocopy (unlike SQLITE_TRANSIENT) with custom deleter
Missing documentation in v0.9.9:
Missing documentation in v1.0.0:
- explain the noncopyable property for RAII design
- comment on returning error code instead of exception that shall not be thrown when exepected (!?)
Missing unit tests in v1.0.0:
- Create Function
- Assert Handler
- Binding variants
Advanced missing features:
- backup support to/from file/:memory:
- Function ?
- Agregate ?
- support for different transaction mode ? NO: too specific
- operator<< binding ? NO: redundant with bind()

View File

@ -4,7 +4,7 @@
*
* Demonstrates how-to use the SQLite++ wrapper
*
* Copyright (c) 2012-2014 Sebastien Rombauts (sebastien.rombauts@gmail.com)
* Copyright (c) 2012-2015 Sebastien Rombauts (sebastien.rombauts@gmail.com)
*
* Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
* or copy at http://opensource.org/licenses/MIT)

View File

@ -3,7 +3,7 @@
* @ingroup SQLiteCpp
* @brief Encapsulation of a Column in a row of the result pointed by the prepared SQLite::Statement.
*
* Copyright (c) 2012-2014 Sebastien Rombauts (sebastien.rombauts@gmail.com)
* Copyright (c) 2012-2015 Sebastien Rombauts (sebastien.rombauts@gmail.com)
*
* Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
* or copy at http://opensource.org/licenses/MIT)

View File

@ -55,14 +55,14 @@ public:
*
* @param[in] apFilename UTF-8 path/uri to the database file ("filename" sqlite3 parameter)
* @param[in] aFlags SQLITE_OPEN_READONLY/SQLITE_OPEN_READWRITE/SQLITE_OPEN_CREATE...
* @param[in] aTimeoutMs Amount of milliseconds to wait before returning SQLITE_BUSY (see setBusyTimeout())
* @param[in] aBusyTimeoutMs Amount of milliseconds to wait before returning SQLITE_BUSY (see setBusyTimeout())
* @param[in] apVfs UTF-8 name of custom VFS to use, or nullptr for sqlite3 default
*
* @throw SQLite::Exception in case of error
*/
Database(const char* apFilename,
const int aFlags = SQLITE_OPEN_READONLY,
const int aTimeoutMs = 0,
const int aBusyTimeoutMs = 0,
const char* apVfs = NULL);
/**
@ -77,14 +77,14 @@ public:
*
* @param[in] aFilename UTF-8 path/uri to the database file ("filename" sqlite3 parameter)
* @param[in] aFlags SQLITE_OPEN_READONLY/SQLITE_OPEN_READWRITE/SQLITE_OPEN_CREATE...
* @param[in] aTimeoutMs Amount of milliseconds to wait before returning SQLITE_BUSY (see setBusyTimeout())
* @param[in] aBusyTimeoutMs Amount of milliseconds to wait before returning SQLITE_BUSY (see setBusyTimeout())
* @param[in] aVfs UTF-8 name of custom VFS to use, or empty string for sqlite3 default
*
* @throw SQLite::Exception in case of error
*/
Database(const std::string& aFilename,
const int aFlags = SQLITE_OPEN_READONLY,
const int aTimeoutMs = 0,
const int aBusyTimeoutMs = 0,
const std::string& aVfs = "");
/**
@ -106,11 +106,11 @@ public:
* Reading the value of timeout for current connection can be done with SQL query "PRAGMA busy_timeout;".
* Default busy timeout is 0ms.
*
* @param[in] aTimeoutMs Amount of milliseconds to wait before returning SQLITE_BUSY
* @param[in] aBusyTimeoutMs Amount of milliseconds to wait before returning SQLITE_BUSY
*
* @throw SQLite::Exception in case of error
*/
void setBusyTimeout(const int aTimeoutMs) noexcept; // nothrow
void setBusyTimeout(const int aBusyTimeoutMs) noexcept; // nothrow
/**
* @brief Shortcut to execute one or multiple statements without results.

View File

@ -5,7 +5,7 @@
*
* Include this main header file in your project to gain access to all functionality provided by the wrapper.
*
* Copyright (c) 2012-2014 Sebastien Rombauts (sebastien.rombauts@gmail.com)
* Copyright (c) 2012-2015 Sebastien Rombauts (sebastien.rombauts@gmail.com)
*
* Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
* or copy at http://opensource.org/licenses/MIT)
@ -38,5 +38,5 @@
* with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same
* numbers used in [SQLITECPP_VERSION].
*/
#define SQLITECPP_VERSION "0.9.9"
#define SQLITECPP_VERSION_NUMBER 0009009
#define SQLITECPP_VERSION "1.0.0"
#define SQLITECPP_VERSION_NUMBER 1000000

View File

@ -1,6 +1,6 @@
# CMake file for compiling the sqlite3 static library under Windows (for ease of use)
#
# Copyright (c) 2013-2014 Sebastien Rombauts (sebastien.rombauts@gmail.com)
# Copyright (c) 2013-2015 Sebastien Rombauts (sebastien.rombauts@gmail.com)
#
# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
# or copy at http://opensource.org/licenses/MIT)

View File

@ -3,7 +3,7 @@
* @ingroup SQLiteCpp
* @brief Encapsulation of a Column in a row of the result pointed by the prepared SQLite::Statement.
*
* Copyright (c) 2012-2014 Sebastien Rombauts (sebastien.rombauts@gmail.com)
* Copyright (c) 2012-2015 Sebastien Rombauts (sebastien.rombauts@gmail.com)
*
* Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
* or copy at http://opensource.org/licenses/MIT)

View File

@ -28,7 +28,7 @@ namespace SQLite
// Open the provided database UTF-8 filename with SQLITE_OPEN_xxx provided flags.
Database::Database(const char* apFilename,
const int aFlags /* = SQLITE_OPEN_READONLY*/,
const int aTimeoutMs /* = 0 */,
const int aBusyTimeoutMs /* = 0 */,
const char* apVfs /* = NULL*/) :
mpSQLite(NULL),
mFilename(apFilename)
@ -41,16 +41,16 @@ Database::Database(const char* apFilename,
throw SQLite::Exception(strerr);
}
if (aTimeoutMs > 0)
if (aBusyTimeoutMs > 0)
{
setBusyTimeout(aTimeoutMs);
setBusyTimeout(aBusyTimeoutMs);
}
}
// Open the provided database UTF-8 filename with SQLITE_OPEN_xxx provided flags.
Database::Database(const std::string& aFilename,
const int aFlags /* = SQLITE_OPEN_READONLY*/,
const int aTimeoutMs /* = 0 */,
const int aBusyTimeoutMs /* = 0 */,
const std::string& aVfs /* = "" */) :
mpSQLite(NULL),
mFilename(aFilename)
@ -63,9 +63,9 @@ Database::Database(const std::string& aFilename,
throw SQLite::Exception(strerr);
}
if (aTimeoutMs > 0)
if (aBusyTimeoutMs > 0)
{
setBusyTimeout(aTimeoutMs);
setBusyTimeout(aBusyTimeoutMs);
}
}
@ -86,13 +86,13 @@ Database::~Database() noexcept // nothrow
* Reading the value of timeout for current connection can be done with SQL query "PRAGMA busy_timeout;".
* Default busy timeout is 0ms.
*
* @param[in] aTimeoutMs Amount of milliseconds to wait before returning SQLITE_BUSY
* @param[in] aBusyTimeoutMs Amount of milliseconds to wait before returning SQLITE_BUSY
*
* @throw SQLite::Exception in case of error
*/
void Database::setBusyTimeout(const int aTimeoutMs) noexcept // nothrow
void Database::setBusyTimeout(const int aBusyTimeoutMs) noexcept // nothrow
{
const int ret = sqlite3_busy_timeout(mpSQLite, aTimeoutMs);
const int ret = sqlite3_busy_timeout(mpSQLite, aBusyTimeoutMs);
check(ret);
}

View File

@ -38,6 +38,7 @@ Transaction::~Transaction() noexcept // nothrow
catch (SQLite::Exception& e)
{
// Never throw an exception in a destructor
(void)e; // warning proof
SQLITECPP_ASSERT(false, e.what()); // See SQLITECPP_ENABLE_ASSERT_HANDLER
}
}

View File

@ -21,7 +21,7 @@ namespace SQLite
/// definition of the assertion handler enabled when SQLITECPP_ENABLE_ASSERT_HANDLER is defined in the project (CMakeList.txt)
void assertion_failed(const char* apFile, const long apLine, const char* apFunc, const char* apExpr, const char* apMsg)
{
// TODO: test that this assertion callback get called
// TODO: unit test that this assertion callback get called (already tested manually)
std::cout << "assertion_failed(" << apFile << ", " << apLine << ", " << apFunc << ", " << apExpr << ", " << apMsg << ")\n";
}
}

View File

@ -84,7 +84,7 @@ TEST(Statement, invalid) {
EXPECT_THROW(query.exec(), SQLite::Exception); // exec() shall throw as it does not expect a result
}
// TODO: test every kind of binding
// TODO: test every kind of binding + clearBindings()
TEST(Statement, getColumnByName) {
// Create a new database