並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 8 件 / 8件

新着順 人気順

python sqlite insert rowsの検索結果1 - 8 件 / 8件

  • sqlc を TypeScript で利用する

    2024 年 12 月 25 日追記 sqlc と sqlc-gen-typescript は積極的なメンテナンスがされていないため、採用するときは注意してください。 まとめ sqlc-gen-typescript かなり良い 自分が TypeScript でウェブアプリを利用するなら間違いなく sqlc を選択する SQL は共通言語という点で本当に偉大 sqlc とは sqlc とは Go で書かれた SQL を元にコードを生成するツール。 なぜ sqlc ? 結局、それぞれの ORM 固有の技術を覚えるくらいなら SQL を覚えた方が早い 拡張に ORM が対応していようがいまいが関係ない SQL パーサーが libpg_query という実際の PostgreSQL サーバーソースを使用している wasilibs/go-pgquery を利用しているので信頼できる Wasm 化され

      sqlc を TypeScript で利用する
    • Parsing SQL - Strumenta

      The code for this tutorial is on GitHub: parsing-sql SQL is a language to handle data in a relational database. If you worked with data you have probably worked with SQL. In this article we will talk about parsing SQL. It is in the same league of HTML: maybe you never learned it formally but you kind of know how to use it. That is great because if you know SQL, you know how to handle data. However

        Parsing SQL - Strumenta
      • Cloudflare WorkersでサーバーレスPythonアプリを構築してみよう | gihyo.jp

        筒井(@ryu22e)です。2024年7月の「Python Monthly Topics」は、Cloudflare WorkersのPythonサポートについて解説します。 前半ではCloudflare WorkersでPythonを使う方法について、後半ではCloudflare WorkersでPythonを動かす仕組みと技術的制限について解説します。 なお、Cloudflare WorkersのPythonサポートは本記事執筆時点(2024年7月24日)でオープンベータ版です。正式リリース時には仕様が変更される可能性があります。また、一部機能はローカル環境でしか利用できません。 Cloudflare Workersとは Cloudflare Workersは、Cloudflareが提供するサーバーレスアプリケーションを構築・デプロイするためのプラットフォームです。主に以下のような特徴が

          Cloudflare WorkersでサーバーレスPythonアプリを構築してみよう | gihyo.jp
        • Supercharge SQLite with Ruby Functions

          An interesting twist in my recent usage of SQLite was the fact that I noticed my research scripts and the database intertwine more. SQLite is unique in that it really lives in-process, unlike standalone database servers. There is a feature to that which does not get used very frequently, but can be indispensable in some situations. By the way, the talk about the system that made me me to explore S

          • sqlc generate は何をしているのかメモ

            [2023-09-11 追記] 以下のブログの方が分かりやすいので、そちらを読むことをお勧めします。 sqlc internals - 薄いブログ 最近、個人開発で Go のアプリケーションからデータベースを操作するために sqlc を使っている。sqlc は SQL で書いたスキーマのファイルから sqlc generate コマンド一つで Go の構造体を、クエリのファイルから型安全な Go の SQL クライアントを生成することができる。1 私は普段の仕事で ORM が提供するメソッドやクエリビルダを使って SQL を組み立てている。ORM は便利ではあるが、最終的に実行される SQL は可読性が低くてデバッグしづらいことが多い。そのため「最初から SQL を書けば良いのでは…?」と考えるようになり、初めて sqlc を見たとき自分の好みに合うツールと確信した。 使い方は簡単で便利な

              sqlc generate は何をしているのかメモ
            • Towards Inserting One Billion Rows in SQLite Under A Minute - blag

              Current Best: 100M rows inserts in 33 seconds. (you can check the source code on Github) Recently, I ran into a situation where I needed a test database with lots of rows and needed it fast. So I did what any programmer would do: wrote a Python script to generate the DB. Unfortunately, it was slow. Really slow. So I did what any programmer would do: went down the rabbit hole of learning more about

              • PCのカメラでISBNコードを読み取りExcelに書籍リストを作る

                operationはsearchRetrieveで固定です。 queryにはURLエンコードした検索クエリの文字列をセットします。requestsを使えば勝手にエンコードしてくれるので検索文字列そのままで大丈夫です。今回はISBNで検索するのでisbn=”{isbn}”で関数の引数として渡すISBNコードを埋め込みます。ISBN以外にも検索できる項目はいっぱいあるので、興味がある方はリファレンスを読んでみてください。 recordPackingはレスポンスのうち書籍情報の部分をURLエンコードした文字列にするか書籍情報以外のXMLにそのままXMLとして内包させるかを指定できます。省略した場合は前者です。XMLにしておいた方がデータを取り出すのが楽なのでxmlにしています。 レスポンスのXMLは次のようなものです。 <?xml version="1.0" encoding="UTF-8"?>

                  PCのカメラでISBNコードを読み取りExcelに書籍リストを作る
                • Sketch of a Post-ORM

                  I’ve been writing a lot of database access code as of late. It’s frustrating that in 2023, my choices are still to either write all of the boilerplate by hand, or hand all database access over to some inscrutable “agile” ORM that will become a crippling liability in the 2-3y timescale. This post is about how I want to use databases, from the perspective of an application server developer—not a DBA

                    Sketch of a Post-ORM
                  1