Skip to main content
Edit this page

sqlite

SQLite データベースに保存されたデータに対してクエリを実行できるようにします。

構文

    sqlite('db_path', 'table_name')

引数

  • db_path — SQLiteデータベースを含むファイルへのパス。String
  • table_name — SQLiteデータベース内のテーブルの名前。String

返される値

  • 元の SQLite テーブルと同じカラムを持つテーブルオブジェクト。

クエリ:

SELECT * FROM sqlite('sqlite.db', 'table1') ORDER BY col2;

結果:

┌─col1──┬─col2─┐
│ line1 │ 1 │
│ line2 │ 2 │
│ line3 │ 3 │
└───────┴──────┘

関連項目

  • SQLite テーブルエンジン