How to escape a sequence argument in sql source in APSW?

93 Views Asked by At

I am rewriting source code from mysql to sqlite and don't know how to escape a sequence argument in APSW driver:

cur.execute("""
    select *
    from users
    where user_id in ?
""", [[1, 2, 3]])

It is definitely a very basic need and it works well in mysql driver but I cannot find any such example for sqlite (APSW) by searching internet.

1

There are 1 best solutions below

0
Itai Sevitt On

This will work:

cur.execute("""
    select *
    from users
    where user_id in ?
""", ((1, 2, 3)))