pycharm查询mysql数据库_如何使用PyCharm查看SQLite数据库中的哪些数据
目录
pycharm查询mysql数据库_如何使用PyCharm查看SQLite数据库中的哪些数据?
我是Python的初学者,我现在使用Flask和SQLAlchemy创建简单的数据库,如下所示:..import all the stuff here
Base = declarative_base()
class Restaurant(Base):
tablename = ‘restaurant’
id = Column(Integer, primary_key=True)
name = Column(String(250), nullable=False)
class MenuItem(Base):
tablename = ‘menu_item’
name = Column(String(250), nullable=False)
id = Column(Integer, primary_key=True)
description = Column(String(250))
price = Column(String(8))
course = Column(String(250))
restaurant_id = Column(Integer, ForeignKey(“restaurant.id”))
restaurant = relationship(Restaurant)
engine = create_engine(‘sqlite:///restaurant.db’)
Base.metadata.create_all(engine)
我来自PHP和MySQL,所以我的问题是:
我正在使用PyCharm IDE。我听说PyCharm有一个检查数据库的内置功能。如何在PyCharm中查看数据库的内容,以便直观地检查数据库的内容,而不是在控制台中运行查询?在