テーブルとビュー
コネクタには、データモデルで使用可能なテーブルとビューを検出するために使用されるシステムテーブルがあります。これらのシステムテーブルのうち、"sys_tables" および"sys_views" は、それぞれ使用可能なテーブルとビューに関する情報を取得するために使用されます。
テーブル
import cdata.email as mod conn = mod.connect("Port=993;Server=outlook.office365.com;Password=password;User=user;Protocol=IMAP;SMTP Port=587;SMTP Server=smtp.office365.com;") cur = conn.cursor() cmd = "SELECT * FROM sys_tables" cur.execute(cmd) rs = cur.fetchall() for row in rs: print(row)
ビュー
import cdata.email as mod conn = mod.connect("Port=993;Server=outlook.office365.com;Password=password;User=user;Protocol=IMAP;SMTP Port=587;SMTP Server=smtp.office365.com;") cur = conn.cursor() cmd = "SELECT * FROM sys_views" cur.execute(cmd, params) rs = cur.fetchall() for row in rs: print(row)