Skip to content

Commit

Permalink
tell sqlite about calc_distance_sq function
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Aug 25, 2014
1 parent 2700bd6 commit 3809571
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dbimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ def main():
import sqlite3
outConn = sqlite3.connect(outDB)
outCur = outConn.cursor()
# Add a function for calculating distance between stars
outConn.create_function("calc_distance_sq", 6, TradeDB.getDistanceSq)

with check_item("Apply DDL commands from '%s'" % dbDef):
# Sure, I could have written: outCur.executescript(open(dbDef).read()).commit()
Expand Down

0 comments on commit 3809571

Please sign in to comment.