HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings.
2.0.0-chaika
Hierarchical Cluster Engine Python language binding
ftests_dbi_fetch.py
Go to the documentation of this file.
1
"""
2
HCE project, Python bindings, Distributed Tasks Manager application.
3
Event objects definitions.
4
5
@package: dtm
6
@file dbi.py
7
@author Oleksii <developers.hce@gmail.com>
8
@link: http://hierarchical-cluster-engine.com/
9
@copyright: Copyright © 2013-2014 IOIX Ukraine
10
@license: http://hierarchical-cluster-engine.com/license/
11
@since: 0.1
12
"""
13
14
15
"""
16
used in:
17
./hce/dtm/Scheduler.py
18
./hce/dtm/TasksManager.py
19
./hce/dtm/TasksDataManager.py
20
"""
21
22
from
dbi.dbi
import
DBI
23
from
dtm.TaskLogScheme
import
TaskLogScheme
24
from
dtm.TaskLog
import
TaskLog
25
26
27
def
run_test
():
28
config_dic = {
"db_name"
:
"sqlite:///:memory:"
}
29
dbi =
DBI
(config_dic)
30
tl =
TaskLog
()
31
tls1 =
TaskLogScheme
(tl)
32
tls1.id = 11
33
tls2 =
TaskLogScheme
(tl)
34
tls2.id = 11
35
dbi.insert(tls1)
36
dbi.insert(tls2)
37
obj = dbi.fetch(tls1,
"id=11"
)
38
print
obj
39
if
len(obj)!=2:
40
print
"BAD"
41
else
:
42
print
"OK"
43
return
44
45
46
47
if
__name__ ==
"__main__"
:
48
49
run_test
()
dtm.TaskLogScheme.TaskLogScheme
Definition:
TaskLogScheme.py:16
dtm.TaskLogScheme
Definition:
TaskLogScheme.py:1
ftests_dbi_fetch.run_test
def run_test()
Definition:
ftests_dbi_fetch.py:27
dtm.TaskLog
Definition:
TaskLog.py:1
dtm.TaskLog.TaskLog
Class describes structures of task item used in TaskManager.
Definition:
TaskLog.py:10
dbi.dbi
Definition:
dbi.py:1
dbi.dbi.DBI
Definition:
dbi.py:37
sources
hce
ftests
dbi
ftests_dbi_fetch.py
Generated on Fri Nov 24 2017 18:53:59 for HCE Project Python language Distributed Tasks Manager Application, Distributed Crawler Application and client API bindings. by
1.8.13