Code Monkey home page Code Monkey logo

cppsqlite's Introduction

CppSQLite

A simple and easy-to-use cross-platform C++ wrapper for the SQLite API, distributed as a simple .cpp/.h pair that you can "just include" in your projects.

This is a fork of the original CppSQLite project, originally by Rob Groves, currently updated and maintained by NeoSmart Technologies.

cppsqlite's People

Contributors

emosewamc avatar emvev avatar fr00b0 avatar mqudsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cppsqlite's Issues

Transaction example

Could you provide example how to do a transaction? Is it even possible currently?

A possible problem

CppSQLite/CppSQLite3.cpp

Lines 68 to 80 in b53922e

SQLite3Memory::SQLite3Memory(SQLite3Memory const& other) :
mnBufferLen(other.mnBufferLen),
mpBuf(sqlite3_malloc(other.mnBufferLen))
{
if (!mpBuf && mnBufferLen>0)
{
throw CppSQLite3Exception(CPPSQLITE_ERROR,
ALLOCATION_ERROR_MESSAGE,
DONT_DELETE_MSG);
}
std::memcpy(mpBuf, other.mpBuf, mnBufferLen);
}

Is it possible that mpBuf is null at that point? Is passing it to memcpy safe enough?

Sqlite Database using UTF-8 and rows containing accentuated characters are not found

My database is encoded as UTF-8. I've several rows that contains strings with accentuated characters (ã, é, í, etc).

A SELECT comand using this strings on the WHERE clause returns no lines.

Code sample:
` string word = "série"; // Just a sample...

    command += "select ";
command += "	type, ";
command += "	originalword, ";
command += "	id ";
command += "from ";
command += "	dict ";
command += "WHERE ";
command += "	word = ? ";
command += "ORDER BY ";
command += "	id asc ";

CppSQLite3Statement stmt = db.compileStatement(command.c_str());

stmt.bind(1, word.c_str());

CppSQLite3Query t;

try
{
	t = stmt.execQuery();
}
catch (CppSQLite3Exception& e)
{`

If "word" have accentuated chars, no lines are returned.

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.