Browse Source

Commenting a duplicated method + adapting LeQuery __query method to the new datasource system

Yann Weber 9 years ago
parent
commit
11c6b2b53e
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      lodel/leapi/query.py

+ 3
- 1
lodel/leapi/query.py View File

64
         LodelHook.call_hook(    self._hook_prefix+'_pre',
64
         LodelHook.call_hook(    self._hook_prefix+'_pre',
65
                                 self._target_class,
65
                                 self._target_class,
66
                                 datas)
66
                                 datas)
67
-        ret = self.__query(self._datasource, **datas)
67
+        ret = self.__query(self._target_class._datasource, **datas)
68
         ret = LodelHook.call_hook(  self._hook_prefix+'_post',
68
         ret = LodelHook.call_hook(  self._hook_prefix+'_post',
69
                                     self._target_class,
69
                                     self._target_class,
70
                                     ret)
70
                                     ret)
461
         if nb_inserted < 0:
461
         if nb_inserted < 0:
462
             raise LeQueryError("Insertion error")
462
             raise LeQueryError("Insertion error")
463
         return nb_inserted
463
         return nb_inserted
464
+    """
464
     ## @brief Implements an insert query operation, with multiple insertions
465
     ## @brief Implements an insert query operation, with multiple insertions
465
     # @param datas : list of **datas to be inserted
466
     # @param datas : list of **datas to be inserted
466
     def __query(self, datas):
467
     def __query(self, datas):
469
         if nb_inserted < 0:
470
         if nb_inserted < 0:
470
             raise LeQueryError("Multiple insertions error")
471
             raise LeQueryError("Multiple insertions error")
471
         return nb_inserted
472
         return nb_inserted
473
+    """
472
 
474
 
473
     ## @brief Execute the insert query
475
     ## @brief Execute the insert query
474
     def execute(self, **datas):
476
     def execute(self, **datas):

Loading…
Cancel
Save