def write(self, bucket, rows, keyed=False, as_generator=False, update_keys=None):
<EOL>if update_keys is not None and len(update_keys) == <NUM_LIT:0>:<EOL><INDENT>message = '<STR_LIT>'<EOL>raise tableschema.exceptions.StorageError(message)<EOL><DEDENT>table = self.__get_table(bucket)<EOL>schema = tableschema.Schema(self.describe(bucket))<EOL>fallbacks = self.__fallbacks.get(bucket, [])<EOL>convert_row = partial(self.__mapper.convert_row, schema=schema, fallbacks=fallbacks)<EOL>writer = Writer(table, schema, update_keys, self.__autoincrement, convert_row)<EOL>with self.__connection.begin():<EOL><INDENT>gen = writer.write(rows, keyed=keyed)<EOL>if as_generator:<EOL><INDENT>return gen<EOL><DEDENT>collections.deque(gen, maxlen=<NUM_LIT:0>)<EOL><DEDENT>
https://github.com/frictionlessdata/tableschema-sql-py#storage