first commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import db
|
||||
|
||||
|
||||
def add_flow_edge(slug, screen_id, from_node_id, from_port, to_node_id):
|
||||
conn = db.connect(slug)
|
||||
conn.execute(
|
||||
"INSERT INTO _flow_edges (screen_id, from_node_id, from_port, to_node_id) VALUES (?, ?, ?, ?)",
|
||||
(screen_id, from_node_id, from_port or "out", to_node_id),
|
||||
)
|
||||
edge_id = conn.execute("SELECT last_insert_rowid() AS id").fetchone()["id"]
|
||||
conn.commit()
|
||||
conn.close()
|
||||
return edge_id
|
||||
Reference in New Issue
Block a user