From 873e48c86c6b1fdcf70ac4df1d746466fd6d0796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Sun, 10 Mar 2013 10:46:22 -0700 Subject: [PATCH] Create gh-pages branch via GitHub --- index.html | 94 ++++++++++++++++++++++++++++++++++++++++------------- params.json | 2 +- 2 files changed, 73 insertions(+), 23 deletions(-) diff --git a/index.html b/index.html index b53d70e..b526086 100644 --- a/index.html +++ b/index.html @@ -31,24 +31,29 @@
-

License

+

About SQLite:

-

Copyright (c) 2012-2013 Sébastien Rombauts (sebastien.rombauts@gmail.com)

+

SQLite is a library that implements a serverless transactional SQL database engine. +It is the most widely deployed SQL database engine in the world. +The source code for SQLite is in the public domain. +http://www.sqlite.org/about.html

-

Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt -or copy at http://opensource.org/licenses/MIT)

+

About SQLiteC++:

+ +

SQLiteC++ offers an encapsulation arround the native C APIs of sqlite, +with a few intuitive and well documented C++ class.

The goals of SQLiteC++ are:

    -
  • to offer the best of existing simple wrappers
  • +
  • to offer the best of existing simple C++ SQLite wrappers
  • to be elegantly written with good C++ design, STL, exceptions and RAII idiom
  • to keep dependencies to a minimum (STL and SQLite3)
  • to be portable
  • to be light and fast
  • to be monothreaded (not thread-safe)
  • to use API names sticking with those of the SQLite library
  • -
  • to be well documented in code with Doxygen, and online with some good examples
  • +
  • to be well documented with Doxygen tags, and with some good examples
  • to be well maintained
  • to use a permissive MIT license, similar to BSD or Boost, for proprietary/commercial usage

It is designed using the Resource Acquisition Is Initialization (RAII) idom @@ -58,20 +63,38 @@ where assert() are used instead). Each SQLiteC++ object must be constructed with a valid SQLite database connection, and then is always valid until destroyed.

-

Depandancies:

+

 Suported platforms:

+ +

Developements and tests are done under the following OSs :

    -
  • a STL implementation (even an old one like VC6/eVC4 should work)
  • -
  • exception support (the class Exception inherite from std::runtime_error)
  • -
  • the SQLite library, either by linking to it dynamicaly or staticaly, -or by adding its source file in your project code base.
  • -

To use it in your project, you only need to add the 6 SQLiteC++ source files -in your project code base (not the main.cpp example file).

+
  • Debian 7 (testing)
  • +
  • Ubuntu 12.04
  • +
  • Windows XP/7/8 +And following IDEs/Compilers
  • +
  • GCC 4.7.x with a provided Makefile
  • +
  • Eclipse CDT under Linux, using the provided Makefile
  • +
  • Visual Studio Express 2008/2010/2012 for testing compatibility purpose
  • +

    Dependencies:

    -

    About SQLite:

    +
      +
    • a STL implementation (even an old one, like the one provided with VC6 should work)
    • +
    • exception support (the class Exception inherit from std::runtime_error)
    • +
    • the SQLite library, either by linking to it dynamicaly or staticaly (libsqlite3-dev under Linux), +or by adding its source file in your project code base (source code provided in src/sqlite3 for Windows).
    • +

    Installation:

    -

    SQLite is a library that implements a serverless transactional SQL database engine. -http://www.sqlite.org/about.html

    +

    To use this wrappers, you need to add the 10 SQLiteC++ source files from the src/ directory +in your project code base, and compile/link against the sqlite library.

    + +

    License

    + +

    Copyright (c) 2012-2013 Sébastien Rombauts (sebastien.rombauts@gmail.com)

    + +

    Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt +or copy at http://opensource.org/licenses/MIT)

    + +

    Getting started

    First sample demonstrates how to query a database and get results:

    @@ -94,7 +117,7 @@ in your project code base (not the main.cpp example file).

    const char* value = query.getColumn(1); int size = query.getColumn(2); - std::cout << "row: " << id << "," << value << "," << size << std::endl; + std::cout << "row: " << id << ", " << value << ", " << size << std::endl; } } catch (std::exception& e) @@ -107,8 +130,7 @@ in your project code base (not the main.cpp example file).

    try
     {
    -    SQLite::Database db("transaction.db3", SQLITE_OPEN_READWRITE|
    -                                           SQLITE_OPEN_CREATE);
    +    SQLite::Database    db("transaction.db3", SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);
     
         db.exec("DROP TABLE IF EXISTS test");
     
    @@ -118,7 +140,7 @@ in your project code base (not the main.cpp example file).

    db.exec("CREATE TABLE test (id INTEGER PRIMARY KEY, value TEXT)"); int nb = db.exec("INSERT INTO test VALUES (NULL, \"test\")"); - std::cout << "INSERT INTO test returned " << nb << std::endl; + std::cout << "INSERT INTO test VALUES (NULL, \"test\")\", returned " << nb << std::endl; // Commit transaction transaction.commit(); @@ -129,7 +151,35 @@ in your project code base (not the main.cpp example file).

    }
    -

    Some other simple C++ SQLite wrappers:

    +

    How to contribute

    + +

    GitHub website

    + +

    The most efficient way to help and contribute to this wrapper project is to +use the tools provided by GitHub:

    + +

    Contact

    + +

    You can also email me directly, I will answer any questions and requests.

    + +

    Coding Style Guidelines

    + +

    The source code use the CamelCase naming style variant where :

    + +
      +
    • type names (class, struct, typedef, enums...) begins with a capital letter
    • +
    • files (.cpp/.h) are named like the class they contains
    • +
    • function and variable names begins with a lower case letter
    • +
    • member variables begins with a 'm', function arguments begins with a 'a', boolean with a 'b', pointers with a 'p'
    • +
    • each file, class, method and member variable is documented using Doxygen tags +See also http://www.appinf.com/download/CppCodingStyleGuide.pdf for good guidelines
    • +

    See also - Some other simple C++ SQLite wrappers:

    + +

    See also the file WRAPPERS.md offering a more complete comparison of other wrappers.

    • @@ -137,7 +187,7 @@ in your project code base (not the main.cpp example file).

    • sqlite3cc: uses boost, modern design, LPGPL
    • -sqlite3pp: uses boost, MIT License
    • +sqlite3pp: uses boost, but never updated since initial publication in may 2012, MIT License
    • SQLite++: uses boost build system, Boost License 1.0
    • diff --git a/params.json b/params.json index c7f3616..4ef97c9 100644 --- a/params.json +++ b/params.json @@ -1 +1 @@ -{"name":"SQLiteC++","tagline":"SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.","body":"### License\r\n\r\nCopyright (c) 2012-2013 Sébastien Rombauts (sebastien.rombauts@gmail.com)\r\n\r\nDistributed under the MIT License (MIT) (See accompanying file LICENSE.txt\r\nor copy at http://opensource.org/licenses/MIT)\r\n\r\n### The goals of SQLiteC++ are:\r\n\r\n- to offer the best of existing simple wrappers\r\n- to be elegantly written with good C++ design, STL, exceptions and RAII idiom\r\n- to keep dependencies to a minimum (STL and SQLite3)\r\n- to be portable\r\n- to be light and fast\r\n- to be monothreaded (not thread-safe)\r\n- to use API names sticking with those of the SQLite library\r\n- to be well documented in code with Doxygen, and online with some good examples\r\n- to be well maintained\r\n- to use a permissive MIT license, similar to BSD or Boost, for proprietary/commercial usage\r\n\r\nIt is designed using the Resource Acquisition Is Initialization (RAII) idom\r\n(see http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization),\r\nand throwing exceptions in case of SQLite errors (exept in destructors,\r\nwhere assert() are used instead).\r\nEach SQLiteC++ object must be constructed with a valid SQLite database connection,\r\nand then is always valid until destroyed.\r\n\r\n### Depandancies:\r\n\r\n - a STL implementation (even an old one like VC6/eVC4 should work)\r\n - exception support (the class Exception inherite from std::runtime_error)\r\n - the SQLite library, either by linking to it dynamicaly or staticaly,\r\n or by adding its source file in your project code base.\r\n\r\nTo use it in your project, you only need to add the 6 SQLiteC++ source files\r\nin your project code base (not the main.cpp example file).\r\n\r\n### About SQLite:\r\nSQLite is a library that implements a serverless transactional SQL database engine.\r\nhttp://www.sqlite.org/about.html\r\n\r\n### First sample demonstrates how to query a database and get results: \r\n\r\n```C++\r\ntry\r\n{\r\n // Open a database file\r\n SQLite::Database db(\"example.db3\");\r\n \r\n // Compile a SQL query, containing one parameter (index 1)\r\n SQLite::Statement query(db, \"SELECT * FROM test WHERE size > ?\");\r\n \r\n // Bind the integer value 6 to the first parameter of the SQL query\r\n query.bind(1, 6);\r\n \r\n // Loop to execute the query step by step, to get rows of result\r\n while (query.executeStep())\r\n {\r\n // Demonstrate how to get some typed column value\r\n int id = query.getColumn(0);\r\n const char* value = query.getColumn(1);\r\n int size = query.getColumn(2);\r\n \r\n std::cout << \"row: \" << id << \",\" << value << \",\" << size << std::endl;\r\n }\r\n}\r\ncatch (std::exception& e)\r\n{\r\n std::cout << \"exception: \" << e.what() << std::endl;\r\n}\r\n```\r\n\r\n### Second sample shows how to manage a transaction:\r\n\r\n```C++\r\ntry\r\n{\r\n SQLite::Database db(\"transaction.db3\", SQLITE_OPEN_READWRITE|\r\n SQLITE_OPEN_CREATE);\r\n\r\n db.exec(\"DROP TABLE IF EXISTS test\");\r\n\r\n // Begin transaction\r\n SQLite::Transaction transaction(db);\r\n\r\n db.exec(\"CREATE TABLE test (id INTEGER PRIMARY KEY, value TEXT)\");\r\n\r\n int nb = db.exec(\"INSERT INTO test VALUES (NULL, \\\"test\\\")\");\r\n std::cout << \"INSERT INTO test returned \" << nb << std::endl;\r\n\r\n // Commit transaction\r\n transaction.commit();\r\n}\r\ncatch (std::exception& e)\r\n{\r\n std::cout << \"exception: \" << e.what() << std::endl;\r\n}\r\n```\r\n\r\n### Some other simple C++ SQLite wrappers:\r\n\r\n - [sqdbcpp](http://code.google.com/p/sqdbcpp/): RAII design, simple, no depandencies, UTF-8/UTF-16, new BSD license\r\n - [sqlite3cc](http://ed.am/dev/sqlite3cc): uses boost, modern design, LPGPL\r\n - [sqlite3pp](http://code.google.com/p/sqlite3pp/): uses boost, MIT License \r\n - [SQLite++](http://sqlitepp.berlios.de/): uses boost build system, Boost License 1.0 \r\n - [CppSQLite](http://www.codeproject.com/Articles/6343/CppSQLite-C-Wrapper-for-SQLite/): famous Code Project but old design, BSD License \r\n - [easySQLite](http://code.google.com/p/easysqlite/): manages table as structured objects, complex ","google":"UA-39176026-1","note":"Don't delete this file! It's used internally to help with page regeneration."} \ No newline at end of file +{"name":"SQLiteC++","tagline":"SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.","body":"### About SQLite:\r\n\r\nSQLite is a library that implements a serverless transactional SQL database engine.\r\nIt is the most widely deployed SQL database engine in the world.\r\nThe source code for SQLite is in the public domain.\r\nhttp://www.sqlite.org/about.html\r\n\r\n### About SQLiteC++:\r\n\r\nSQLiteC++ offers an encapsulation arround the native C APIs of sqlite,\r\nwith a few intuitive and well documented C++ class.\r\n\r\n### The goals of SQLiteC++ are:\r\n\r\n- to offer the best of existing simple C++ SQLite wrappers\r\n- to be elegantly written with good C++ design, STL, exceptions and RAII idiom\r\n- to keep dependencies to a minimum (STL and SQLite3)\r\n- to be portable\r\n- to be light and fast\r\n- to be monothreaded (not thread-safe)\r\n- to use API names sticking with those of the SQLite library\r\n- to be well documented with Doxygen tags, and with some good examples\r\n- to be well maintained\r\n- to use a permissive MIT license, similar to BSD or Boost, for proprietary/commercial usage\r\n\r\nIt is designed using the Resource Acquisition Is Initialization (RAII) idom\r\n(see http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization),\r\nand throwing exceptions in case of SQLite errors (exept in destructors,\r\nwhere assert() are used instead).\r\nEach SQLiteC++ object must be constructed with a valid SQLite database connection,\r\nand then is always valid until destroyed.\r\n\r\n### Suported platforms:\r\n\r\nDevelopements and tests are done under the following OSs :\r\n- Debian 7 (testing)\r\n- Ubuntu 12.04\r\n- Windows XP/7/8\r\nAnd following IDEs/Compilers\r\n- GCC 4.7.x with a provided Makefile\r\n- Eclipse CDT under Linux, using the provided Makefile\r\n- Visual Studio Express 2008/2010/2012 for testing compatibility purpose\r\n\r\n### Dependencies:\r\n\r\n- a STL implementation (even an old one, like the one provided with VC6 should work)\r\n- exception support (the class Exception inherit from std::runtime_error)\r\n- the SQLite library, either by linking to it dynamicaly or staticaly (libsqlite3-dev under Linux),\r\n or by adding its source file in your project code base (source code provided in src/sqlite3 for Windows).\r\n\r\n### Installation:\r\n\r\nTo use this wrappers, you need to add the 10 SQLiteC++ source files from the src/ directory\r\nin your project code base, and compile/link against the sqlite library.\r\n\r\n### License\r\n\r\nCopyright (c) 2012-2013 Sébastien Rombauts (sebastien.rombauts@gmail.com)\r\n\r\nDistributed under the MIT License (MIT) (See accompanying file LICENSE.txt\r\nor copy at http://opensource.org/licenses/MIT)\r\n\r\n## Getting started\r\n### First sample demonstrates how to query a database and get results: \r\n\r\n```C++\r\ntry\r\n{\r\n // Open a database file\r\n SQLite::Database db(\"example.db3\");\r\n \r\n // Compile a SQL query, containing one parameter (index 1)\r\n SQLite::Statement query(db, \"SELECT * FROM test WHERE size > ?\");\r\n \r\n // Bind the integer value 6 to the first parameter of the SQL query\r\n query.bind(1, 6);\r\n \r\n // Loop to execute the query step by step, to get rows of result\r\n while (query.executeStep())\r\n {\r\n // Demonstrate how to get some typed column value\r\n int id = query.getColumn(0);\r\n const char* value = query.getColumn(1);\r\n int size = query.getColumn(2);\r\n \r\n std::cout << \"row: \" << id << \", \" << value << \", \" << size << std::endl;\r\n }\r\n}\r\ncatch (std::exception& e)\r\n{\r\n std::cout << \"exception: \" << e.what() << std::endl;\r\n}\r\n```\r\n\r\n### Second sample shows how to manage a transaction:\r\n\r\n```C++\r\ntry\r\n{\r\n SQLite::Database db(\"transaction.db3\", SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);\r\n\r\n db.exec(\"DROP TABLE IF EXISTS test\");\r\n\r\n // Begin transaction\r\n SQLite::Transaction transaction(db);\r\n\r\n db.exec(\"CREATE TABLE test (id INTEGER PRIMARY KEY, value TEXT)\");\r\n\r\n int nb = db.exec(\"INSERT INTO test VALUES (NULL, \\\"test\\\")\");\r\n std::cout << \"INSERT INTO test VALUES (NULL, \\\"test\\\")\\\", returned \" << nb << std::endl;\r\n\r\n // Commit transaction\r\n transaction.commit();\r\n}\r\ncatch (std::exception& e)\r\n{\r\n std::cout << \"exception: \" << e.what() << std::endl;\r\n}\r\n```\r\n\r\n## How to contribute\r\n### GitHub website\r\nThe most efficient way to help and contribute to this wrapper project is to\r\nuse the tools provided by GitHub:\r\n- please fill bug reports and feature requests here: https://github.com/SRombauts/SQLiteCpp/issues\r\n- fork the repository, make some small changes and submit them with pull-request\r\n\r\n### Contact\r\nYou can also email me directly, I will answer any questions and requests.\r\n\r\n### Coding Style Guidelines\r\nThe source code use the CamelCase naming style variant where :\r\n- type names (class, struct, typedef, enums...) begins with a capital letter\r\n- files (.cpp/.h) are named like the class they contains\r\n- function and variable names begins with a lower case letter\r\n- member variables begins with a 'm', function arguments begins with a 'a', boolean with a 'b', pointers with a 'p'\r\n- each file, class, method and member variable is documented using Doxygen tags\r\nSee also http://www.appinf.com/download/CppCodingStyleGuide.pdf for good guidelines\r\n\r\n## See also - Some other simple C++ SQLite wrappers:\r\n\r\nSee also the file WRAPPERS.md offering a more complete comparison of other wrappers.\r\n - [sqdbcpp](http://code.google.com/p/sqdbcpp/): RAII design, simple, no depandencies, UTF-8/UTF-16, new BSD license\r\n - [sqlite3cc](http://ed.am/dev/sqlite3cc): uses boost, modern design, LPGPL\r\n - [sqlite3pp](http://code.google.com/p/sqlite3pp/): uses boost, but never updated since initial publication in may 2012, MIT License\r\n - [SQLite++](http://sqlitepp.berlios.de/): uses boost build system, Boost License 1.0 \r\n - [CppSQLite](http://www.codeproject.com/Articles/6343/CppSQLite-C-Wrapper-for-SQLite/): famous Code Project but old design, BSD License \r\n - [easySQLite](http://code.google.com/p/easysqlite/): manages table as structured objects, complex \r\n","google":"UA-39176026-1","note":"Don't delete this file! It's used internally to help with page regeneration."} \ No newline at end of file