Fix build error
This commit is contained in:
@@ -3,16 +3,16 @@ from .database import *
|
||||
|
||||
def sql_update_coord(node: str, x: float, y: float) -> str:
|
||||
coord = f"st_geomfromtext('point({x} {y})')"
|
||||
return f"update coordinates set coord = {coord} where node = '{node}';"
|
||||
return str(f"update coordinates set coord = {coord} where node = '{node}';")
|
||||
|
||||
|
||||
def sql_insert_coord(node: str, x: float, y: float) -> str:
|
||||
coord = f"st_geomfromtext('point({x} {y})')"
|
||||
return f"insert into coordinates (node, coord) values ('{node}', {coord});"
|
||||
return str(f"insert into coordinates (node, coord) values ('{node}', {coord});")
|
||||
|
||||
|
||||
def sql_delete_coord(node: str) -> str:
|
||||
return f"delete from coordinates where node = '{node}';"
|
||||
return str(f"delete from coordinates where node = '{node}';")
|
||||
|
||||
|
||||
def from_postgis_point(coord: str) -> dict[str, float]:
|
||||
@@ -43,7 +43,7 @@ def inp_in_coord(line: str) -> str:
|
||||
tokens = line.split()
|
||||
node = tokens[0]
|
||||
coord = f"st_geomfromtext('point({tokens[1]} {tokens[2]})')"
|
||||
return f"insert into coordinates (node, coord) values ('{node}', {coord});"
|
||||
return str(f"insert into coordinates (node, coord) values ('{node}', {coord});")
|
||||
|
||||
|
||||
def inp_out_coord(name: str) -> list[str]:
|
||||
|
||||
Reference in New Issue
Block a user