equal
deleted
inserted
replaced
498 # expect sunday to be 1, saturday 7 while weekday method return 0 for |
498 # expect sunday to be 1, saturday 7 while weekday method return 0 for |
499 # monday |
499 # monday |
500 return (dt.weekday() + 1) % 7 |
500 return (dt.weekday() + 1) % 7 |
501 cnx.create_function("WEEKDAY", 1, weekday) |
501 cnx.create_function("WEEKDAY", 1, weekday) |
502 |
502 |
|
503 cnx.cursor().execute("pragma foreign_keys = on") |
|
504 |
503 import yams.constraints |
505 import yams.constraints |
504 yams.constraints.patch_sqlite_decimal() |
506 yams.constraints.patch_sqlite_decimal() |
505 |
507 |
506 sqlite_hooks = SQL_CONNECT_HOOKS.setdefault('sqlite', []) |
508 sqlite_hooks = SQL_CONNECT_HOOKS.setdefault('sqlite', []) |
507 sqlite_hooks.append(init_sqlite_connexion) |
509 sqlite_hooks.append(init_sqlite_connexion) |