Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
HDBC初学者在这里。我想查看我的表的架构。我知道我可以describeTable用来获取SqlColDesc每个表的,但我也想查看SqlColDesc不包含的主键和外键。有没有办法通过 HDBC 或其他 Haskell 接口访问这些信息?
describeTable
SqlColDesc
更新:我意识到我可以通过查询访问信息。由于我为 HDBC 使用 Sqlite3 后端,因此 SQL 是
select sql from sqlite_master where type="table";
我仍然需要提取相关的元数据,因为似乎没有任何便利功能。