Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
98a8f9f3
Commit
98a8f9f3
authored
Dec 26, 2012
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(SQLite): первая версия реализации uniset-sqlite-dbserver
parent
11c8f221
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
test.xml
conf/test.xml
+1
-1
SQLiteInterface.cc
extensions/DBServer-SQLite/SQLiteInterface.cc
+5
-0
No files found.
conf/test.xml
View file @
98a8f9f3
...
...
@@ -27,7 +27,7 @@
<RouteList>
</RouteList>
</LocalInfoServer>
<LocalDBServer
dbname=
"UNISET_PLC"
dbpass=
"dbadmin"
dbuser=
"dbadmin"
name=
"DBServer"
pingTime=
"60000"
reconnectTime=
"30000"
/>
<LocalDBServer
db
file=
"test.db"
db
name=
"UNISET_PLC"
dbpass=
"dbadmin"
dbuser=
"dbadmin"
name=
"DBServer"
pingTime=
"60000"
reconnectTime=
"30000"
/>
<LocalPrintServer
checkTime=
"5000"
device=
"/dev/lp0"
/>
</Services>
</UniSet>
...
...
extensions/DBServer-SQLite/SQLiteInterface.cc
View file @
98a8f9f3
...
...
@@ -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 по умолчанию, создаёт файл при открытии, то проверим "сами"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment