

def last_insert_id(self, cursor, model):
    sequence = self._get_pk_sequence(model)
    if (not sequence):
        return
    meta = model._meta
    if meta.schema:
        schema = ('%s.' % meta.schema)
    else:
        schema = ''
    cursor.execute(('SELECT CURRVAL(\'%s"%s"\')' % (self, sequence)))
    result = cursor.fetchone()[0]
    if self.get_autocommit():
        self.commit()
    return result

dataset/ETHPy150Open coleifer/peewee/peewee.py PostgresqlDatabase.last_insert_id/VarMisuse@75/99 `schema`->`self`