_______ .__ .__ .__ .__ \ \ ____ __ __ _______ |__|| | | | |__| ____ ____ / | \ _/ __ \ | | \\_ __ \| || | | | | | / _ \ / \ / | \\ ___/ | | / | | \/| || |__| |__| |( <_> )| | \ \____|__ / \___ >|____/ |__| |__||____/|____/|__| \____/ |___| / =========\/======\/=================================================\/== v0.01 04/JUL/2007 (C) Copyright 2007-2007 Scott D. Yelich SOME RIGHTS RESERVED .,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.-*~'`^`'~*-,._.,-*~'`^`'~*-,. The software is released under Creative Commons - Attribution 3.0 unported see: http://creativecommons.org/licenses/by/3.0/legalcode See "LICENSE" for text, URL above for latest version. See "INSTALL" for information on installation (and usage). See "TODO" for ideas about what could be done in a next version. One weak spot with sqlite is with scaling and concurrency. Sqlite3 does have a few things to help with concurrency such as sqlite3_busy_timeout and sqlite3_busy_handler. After fiddling with the timeout feature for a while, it seemed that using the busy handler would allow for more control. Yet, even with a busy handler, sqlite may still return an error code. So along with concurrency, this version of Xql3 (Xql3.cpp) uses C++ exceptions via an exception class Xql3Exception (Xql3Exception.h) that returns both an error code as well as an error message. A timer using nanosleep is in the sleeper test program (sleeper.cpp). Run lock (lock.cpp) to lock the sqlite database in order to test concurrency (lock X where X is how many times a second to lock/unlock the database). For fun, it's possible to even run multiple copies of lock at the same time with different parameters. While lock is running and the ":" (locked) and "." (unlocked) are being displayed, run concurrency_v1 (concurrency_v1.cpp). Although most of the time the busy detection will hit a busy/retry before all the sql statements and then be able to run them all before another busy is detected, it is possible to detect a lock/busy before any sqlite3 command. Enjoy! Scott