Commit 98a8f9f3 authored by Pavel Vainerman's avatar Pavel Vainerman

(SQLite): первая версия реализации uniset-sqlite-dbserver

parent 11c8f221
......@@ -27,7 +27,7 @@
<RouteList>
</RouteList>
</LocalInfoServer>
<LocalDBServer dbname="UNISET_PLC" dbpass="dbadmin" dbuser="dbadmin" name="DBServer" pingTime="60000" reconnectTime="30000"/>
<LocalDBServer dbfile="test.db" dbname="UNISET_PLC" dbpass="dbadmin" dbuser="dbadmin" name="DBServer" pingTime="60000" reconnectTime="30000"/>
<LocalPrintServer checkTime="5000" device="/dev/lp0"/>
</Services>
</UniSet>
......
......@@ -49,6 +49,11 @@ SQLiteInterface::~SQLiteInterface()
}
// -----------------------------------------------------------------------------------------
bool SQLiteInterface::ping()
{
return db && ( sqlite3_db_status(db,0,NULL,NULL,0) == SQLITE_OK );
}
// -----------------------------------------------------------------------------------------
bool SQLiteInterface::connect( const string dbfile, bool create )
{
// т.к. sqlite3 по умолчанию, создаёт файл при открытии, то проверим "сами"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment