気合いで実装、どうもかわしんです。 この記事は Rust Advent Calendar 2023 の6日目 兼 情報検索・検索技術 Advent Calendar 2023 の 6 日目です。 Rust で SQLite をフルスクラッチで実装しています。 github.com なぜ SQLite を Rust で再実装しようと思ったのかについては以前の記事で紹介しています。一言で言えば、誰も Rust で SQLite を書いている人がいなかったからやってみたのですが、そもそも SQLite が強すぎるということが再実装しているうちにわかってきて絶望しています。 kawasin73.hatenablog.com 4 ヶ月前にこの記事を書いたときは簡単な SELECT 文しか実行できなかったのですが、現時点では SELECT, INSERT, DELETE 文をサポートし、express
セキュリティを盾に一点突破。どうもかわしんです。最近 Rust で SQLite を実装してます。 以前の記事で HTTP Parser を Rust で実装しようとしたものの、すでに実装されていたので断念しましたが、いい題材を見つけました。SQLite です。開発中のリポジトリはこれです。 github.com 今の時点では、Read Only で1つの WHERE 句を持った SELECT 文しか処理できないですが、以下の機能を実装しています。 sqlite3 で生成された database ファイルの読み取り (cursor.rs, btree.rs, record.rs) SQL 文の解析 (token.rs, parser.rs) テーブルとインデックスのメタデータのパース (schema.rs) 動的なファイルの読み込み (pager.rs) SQL クエリとスキーマ情報を元に
This article explains how SQLite can be extended with Rust. In particular, it will outline SQLite’s mechanism called virtual tables and showcase how we can use it from Rust programming language. In the end, we will have a working extension that can be dynamically loaded and used from SQLite. This article does not claim to be an exhaustive guide about extending SQLite with Rust, but I hope the read
Introduction Rustでsqliteを操作するためのcrateはたくさんありますが、 今回はRusqliteというcrateを使って Sqliteにアクセスしてみました。 RustからPostgreSQLにアクセスするcrate、rust-postgresをベースに作成されており、 似たようなインターフェイスで使うことが可能になっています。 Environment MacBook Pro (13-inch, M1, 2020) OS : MacOS 11.3.1 rust : 1.61.0 Try Sqliteのセットアップ まずはsqlite3をHomebrewでインストールします。 % brew install sqlite3 インストールできたらexample_db.db3と名前指定して起動。 % sqlite3 example_db.db3 sqlite> テーブル作成
Replacing Elasticsearch with Rust and SQLite Published on: November 21, 2017 Caveat: Elasticsearch is a multi-purpose, distributed, battle-tested, schema-free, log and document storage engine. We’ll be replacing it with a single-purpose, relational schema, me-tested, and custom nginx access log storage engine. Knowing that, let’s begin. Find this project on Github After building my home server, I
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く