|
@@ -478,7 +478,7 @@ raised when trying to import Datasource"
|
478
|
478
|
# @return a new uid en case of success, False otherwise
|
479
|
479
|
@classmethod
|
480
|
480
|
def insert(cls, datas):
|
481
|
|
- query = LeInsertQuery(cls.__name__)
|
|
481
|
+ query = LeInsertQuery(cls)
|
482
|
482
|
return query.execute(datas)
|
483
|
483
|
|
484
|
484
|
## @brief Update an instance of LeObject
|
|
@@ -492,7 +492,7 @@ raised when trying to import Datasource"
|
492
|
492
|
query_filter.append((uid, '=', self.data(uid)))
|
493
|
493
|
|
494
|
494
|
try:
|
495
|
|
- query = LeUpdateQuery(cls.__name__, query_filter)
|
|
495
|
+ query = LeUpdateQuery(cls, query_filter)
|
496
|
496
|
except Exception as err:
|
497
|
497
|
raise err
|
498
|
498
|
|
|
@@ -511,7 +511,7 @@ raised when trying to import Datasource"
|
511
|
511
|
query_filter = list()
|
512
|
512
|
for uid in uids:
|
513
|
513
|
query_filter.append((uid, '=', self.data(uid)))
|
514
|
|
- query = LeDeleteQuery(cls.__name__, query_filter)
|
|
514
|
+ query = LeDeleteQuery(cls, query_filter)
|
515
|
515
|
try:
|
516
|
516
|
result = query.execute()
|
517
|
517
|
except LeQueryError as err:
|
|
@@ -526,7 +526,7 @@ raised when trying to import Datasource"
|
526
|
526
|
def delete_bundle(cls, query_filters):
|
527
|
527
|
deleted = 0
|
528
|
528
|
try:
|
529
|
|
- query = LeDeleteQuery(cls.__name__, query_filters)
|
|
529
|
+ query = LeDeleteQuery(cls, query_filters)
|
530
|
530
|
except Exception as err:
|
531
|
531
|
raise err
|
532
|
532
|
|
|
@@ -565,7 +565,7 @@ raised when trying to import Datasource"
|
565
|
565
|
query_filter.append((uids, '=', uid_tuples))
|
566
|
566
|
else:
|
567
|
567
|
raise AttributeError("n %s:load :%s not a valid value for %s" % (uid_tuples, uids))
|
568
|
|
- query = LeGetQuery(cls.__name__, query_filter, limit = 1)
|
|
568
|
+ query = LeGetQuery(cls, query_filter, limit = 1)
|
569
|
569
|
try:
|
570
|
570
|
result=query.execute()
|
571
|
571
|
except LeQueryError as err:
|
|
@@ -598,7 +598,7 @@ raised when trying to import Datasource"
|
598
|
598
|
raise AttributeError("In %s:get : Cannot instanciate a LeObject without it's identifier" % cls.__name__)
|
599
|
599
|
|
600
|
600
|
try:
|
601
|
|
- query = LeGetQuery(cls.__name__, query_filter, field_list = field_list, order = order, group = group, limit = limit, offset = offset)
|
|
601
|
+ query = LeGetQuery(cls, query_filter, field_list = field_list, order = order, group = group, limit = limit, offset = offset)
|
602
|
602
|
except ValueError as err:
|
603
|
603
|
raise err
|
604
|
604
|
|