Example #1
0
 def many(self, method, rows):
     'Save a list of row objects efficiently'
     if inspect.isgenerator(rows):
         rows = list(rows)
     if not rows:
         return
     table = rows[0].__class__
     loadmany = getattr(table, '_' + method).many
     return loadmany(
         self.conn, [generic.adapt(self.driver, r) for r in rows])
Example #2
0
 def save(self, row):
     return generic.adapt(self.driver, row)._save(self.conn)
Example #3
0
 def insert(self, row):
     return generic.adapt(self.driver, row)._insert(self.conn)
Example #4
0
 def update(self, row):
     return generic.adapt(self.driver, row)._update(self.conn)
Example #5
0
 def create(self, row):
     return generic.adapt(self.driver, row)._create(self.conn)
Example #6
0
 def save(self, row):
     return generic.adapt(self.conn.uridict, row)._save(self.conn)
Example #7
0
 def update(self, row):
     return generic.adapt(self.conn.uridict, row)._update(self.conn)
Example #8
0
 def insert(self, row):
     return generic.adapt(self.conn.uridict, row)._insert(self.conn)
Example #9
0
 def create(self, row):
     return generic.adapt(self.conn.uridict, row)._create(self.conn)