Created
July 2, 2023 17:35
-
-
Save joaofig/e2c97c0ef8d3c45d42922a59af7a1d6f to your computer and use it in GitHub Desktop.
Inserts the expanded triples list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def insert_triples(traj_id: int, | |
triples: list[(int,int,int)]): | |
db = TrajDb() | |
sql = "insert into triple (traj_id, t0, t1, t2) values (?, ?, ?, ?)" | |
params = [(traj_id, t0, t1, t2) for t0, t1, t2 in triples] | |
db.execute_sql(sql, params, many=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment