|
@@ -1,5 +1,6 @@
|
1
|
1
|
#-*- coding: utf-8 -*-
|
2
|
2
|
|
|
3
|
+import sqlite3
|
3
|
4
|
from leobject.datasources.dummy import DummyDatasource
|
4
|
5
|
from mosql.db import Database, all_to_dicts
|
5
|
6
|
from mosql.query import select, insert, update, delete, join
|
|
@@ -12,12 +13,12 @@ class LeDataSourceSQL(DummyDatasource):
|
12
|
13
|
RELATIONS_POSITIONS_FIELDS = {REL_SUP: 'superior_id', REL_SUB: 'subordinate_id'}
|
13
|
14
|
RELATIONS_NATURE_FIELD = 'nature'
|
14
|
15
|
|
15
|
|
- MODULE = 'sqlite3'
|
|
16
|
+ MODULE = sqlite3
|
16
|
17
|
|
17
|
18
|
def __init__(self, module=None, *conn_args, **conn_kargs):
|
18
|
19
|
self.module = self.MODULE if module is None else module
|
19
|
20
|
super(LeDataSourceSQL, self).__init__()
|
20
|
|
- self.connection = Database(self.module, self.conn_args, self.conn_kargs)
|
|
21
|
+ self.connection = Database(self.module, *conn_args, **conn_kargs)
|
21
|
22
|
|
22
|
23
|
## @brief update an existing object's data
|
23
|
24
|
# @param letype LeType
|