Browse Source

[#61] added the LeDataSourceSQL class

Roland Haroutiounian 9 years ago
parent
commit
a935446871
2 changed files with 23 additions and 5 deletions
  1. 6
    5
      leobject/datasources/ledatasource.py
  2. 17
    0
      leobject/datasources/ledatasourcesql.py

+ 6
- 5
leobject/datasources/ledatasource.py View File

@@ -9,10 +9,11 @@ class LeDataSource(object):
9 9
 
10 10
 
11 11
     ## @brief search for a collection of objects
12
-    # @param emclass
13
-    # @param emtype
14
-    # @param filters
12
+    # @param emclass LeClass : LeClass instance
13
+    # @param emtype LeType : LeType instance
14
+    # @param field_list list : list of fields to get from the datasource
15
+    # @param filters list : list of tuples formatted as (FIELD, OPERATOR, VALUE)
15 16
     # @param relational_filters
16
-    def get(self, emclass, emtype, filters, relational_filters):
17
-        pass
17
+    def get(self, emclass, emtype, field_list, filters, relational_filters):
18
+        return False
18 19
 

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

@@ -0,0 +1,17 @@
1
+#-*- coding: utf-8 -*-
2
+
3
+from ledatasource import LeDataSource
4
+
5
+## SQL DataSource for LeObject
6
+class LeDataSourceSQL(LeDataSource):
7
+
8
+    def __init__(self, options=None):
9
+        self.options = options
10
+
11
+    ## @brief search for a collection of objects
12
+    # @param emclass
13
+    # @param emtype
14
+    # @param filters list : list of tuples formatted as (FIELD, OPERATOR, VALUE)
15
+    # @param relational_filters
16
+    def get(self, emclass, emtype, field_list, filters, relational_filters):
17
+        pass

Loading…
Cancel
Save