def prepare_database_with_table(name: str, rows: list):
    from peewee import IntegerField, Proxy, CharField, Model
    from playhouse.sqlite_ext import CSqliteExtDatabase
    db = Proxy()
    db.initialize(CSqliteExtDatabase(':memory:', bloomfilter=True))
    NameModel = type(name, (Model,), {'id_': IntegerField(primary_key=True, column_name='id'), 'name': CharField(column_name='name')})
    table: Model = NameModel()
    table.bind(db)
    db.create_tables([NameModel])
    for row in rows:
        table.insert(row).execute()
    return db
def prepare_database_with_table(name: str, rows: list):
    from peewee import IntegerField, Proxy, CharField, Model
    from playhouse.sqlite_ext import CSqliteExtDatabase
    db = Proxy()
    db.initialize(CSqliteExtDatabase(':memory:', bloomfilter=True))
    NameModel = type(name, (Model,), {'id_': IntegerField(primary_key=True, column_name='id'), 'name': CharField(column_name='name')})
    table: Model = NameModel()
    table.bind(db)
    db.create_tables([NameModel])
    for row in rows:
        table.insert(row).execute()
    return db