Browse Source

[#61] added a default module setting to LeDataSourceSQL object

Roland Haroutiounian 9 years ago
parent
commit
ee89b62f40
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      leobject/datasources/ledatasourcesql.py

+ 3
- 0
leobject/datasources/ledatasourcesql.py View File

@@ -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
@@ -12,8 +13,10 @@ class LeDataSourceSQL(DummyDatasource):
12 13
 
13 14
     RELATIONS_TABLE_NAME = 'relations'
14 15
     RELATIONS_POSITIONS_FIELDS = {REL_SUP:'superior_id', REL_SUB:'subordinate_id'}
16
+    MODULE = 'sqlite3'
15 17
 
16 18
     def __init__(self, module=None, *conn_args, **conn_kargs):
19
+        self.module = self.MODULE if module == None else module
17 20
         super(LeDataSourceSQL, self).__init__()
18 21
         self.db = Database(self.module, self.conn_args, self.conn_kargs)
19 22
 

Loading…
Cancel
Save