#!E:\Pycharm Projects\Waytous
# -*- coding: utf-8 -*-
# @Time : 2022/8/2 17:07
# @Author : Opfer
# @Site :
# @File : topo_sql.py.py    
# @Software: PyCharm

import sqlite3

conn = sqlite3.connect('test.db')
c = conn.cursor()
print ("数据库打开成功")

cursor = c.execute("SELECT * FROM GRAPH")

# c.execute("INSERT INTO GRAPH (id, startNodeId, endNodeId, distance) VALUES ('text_id12', 'as4343', 'sdsdsd', 20000.00 )")

# conn.commit()

for row in cursor:
    print("id = ", row[0])
    print("startNodeId = ", row[1])
    print("endNodeId = ", row[2])
    print("distance= ", row[3])
    print("dir= ", row[4])

print ("数据操作成功")
conn.close()
