Skip to content

Instantly share code, notes, and snippets.

@joaofig
Created July 2, 2023 17:32
Show Gist options
  • Select an option

  • Save joaofig/9b2b59bf7372b096911927fcf4858251 to your computer and use it in GitHub Desktop.

Select an option

Save joaofig/9b2b59bf7372b096911927fcf4858251 to your computer and use it in GitHub Desktop.
Inserts the trajectory H3 token list
def insert_h3(traj_id: int,
h3_list: list[int]) -> None:
db = TrajDb()
sql = "insert into traj_h3 (traj_id, h3) values (?, ?)"
params = [[traj_id, int(h)] for h in h3_list]
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