Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SELECT DELETE or INSERT your Spreadsheet from GAS

License

Notifications You must be signed in to change notification settings

Mya-Mya/spreadsheets-query

Repository files navigation

概要と計画

sq.open("Spreadsheet-ID", "FoodsSheet")
 .select(["name", "genre", "calorie"])
 .where(sq.numberLessThan("calorie", 500))
 .orderby("name")
 .limit(20)
 .json()
  • Spreadsheetにある情報をSQLと似た様式で抽出、削除、追加できるライブラリ。
  • いわゆる「SQLインジェクション」を防ぐため、「WHERE句」はオブジェクト指向プログラミングにより構築をする。悪意のあるコードが混入しないような仕組みを設ける。
  • 情報の抽出にはThe Google Visualization API Query Languageを用いる。 同言語のコードを記述したQUERY関数を一時的にSpreadsheet上に貼り付け、その結果を読み取るという仕組み。
  • 情報の削除には一般的な線形探索を用いる。
  • 情報の追加にはSpreadsheet Serviceの関数をそのまま使う。
  • これらのコードはWebpackを用いてGAS上で実行可能なコードに変換と集約をした後、一般公開する。一般公開すると、他のGASプロジェクトから本ライブラリを使用できる。

About

SELECT DELETE or INSERT your Spreadsheet from GAS

Topics

Resources

License

Stars

Watchers

Forks

AltStyle によって変換されたページ (->オリジナル) /