You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
name="description"
9
9
content="KiteSQL is an embedded relational engine for Rust with SQL, native APIs, ORM workflows, schema migration, and an in-browser WebAssembly playground."
<div class="metric"><strong>Browser-ready</strong><span>same engine available through wasm</span></div>
57
+
<div class="metric"><strong>Browser-ready</strong><span>npm wasm package at 0.3.2</span></div>
58
58
</div>
59
59
</div>
60
60
<div class="hero-side">
@@ -70,13 +70,17 @@ struct User {
70
70
score: i32,
71
71
}
72
72
73
-
db.migrate::<User>()?;
74
-
db.insert(&user)?;
75
-
let rows = db
76
-
.select::<User>()
77
-
.filter(User::score().gte(90))
78
-
.order_by(User::score().desc())
79
-
.fetch()?;</code></pre>
73
+
database.migrate::<User>()?;
74
+
database.insert_many(users)?;
75
+
76
+
let rows = database
77
+
.bind(|ctx| {
78
+
ctx.from::<User>()?
79
+
.filter(|e| e.column(User::score())?.gte(90))?
80
+
.project_scalars((User::id(), User::email()))?
81
+
.finish()
82
+
})?
83
+
.project_tuple::<(i32, String)>();</code></pre>
80
84
</div>
81
85
<div class="mini-card secondary sql-card">
82
86
<pre><code>SELECT team, AVG(score) AS avg_score
@@ -114,7 +118,7 @@ ORDER BY avg_score DESC;</code></pre>
114
118
</article>
115
119
<article class="feature-card card-lite">
116
120
<h3>Runs in the browser</h3>
117
-
<p>The published WebAssembly build lets users explore KiteSQL in a browser tab with no backend service and no local database server.</p>
121
+
<p>The published <code>kite_sql@0.3.2</code> WebAssembly build lets users explore KiteSQL in a browser tab with no backend service and no local database server.</p>
118
122
</article>
119
123
</div>
120
124
</section>
@@ -140,20 +144,23 @@ ORDER BY avg_score DESC;</code></pre>
140
144
</div>
141
145
</div>
142
146
<div class="card-lite info-panel code-panel">
143
-
<div class="eyebrow">Typical flow</div>
144
-
<pre><code>let db = DataBaseBuilder::path("./data").build()?;
145
-
146
-
db.migrate::<User>()?;
147
-
db.insert(&user)?;
148
-
149
-
let ranked = db
150
-
.select::<User>()
151
-
.filter(User::score().gte(80))
152
-
.order_by(User::score().desc())
153
-
.limit(20)
154
-
.fetch()?;
155
-
156
-
let rows = db.run("select count(*) from users")?;</code></pre>
let rows = database.run("select count(*) from users")?;</code></pre>
157
164
</div>
158
165
</section>
159
166
@@ -163,7 +170,7 @@ let rows = db.run("select count(*) from users")?;</code></pre>
163
170
<div class="eyebrow">WebAssembly playground</div>
164
171
<h2>Open a browser tab and play with KiteSQL</h2>
165
172
</div>
166
-
<p>This playground runs fully in your browser using the published <code>kite_sql</code> wasm bundle. No server, no backend, no setup beyond loading the page.</p>
173
+
<p>This playground runs fully in your browser using the published <code>kite_sql@0.3.2</code> wasm bundle. No server, no backend, no setup beyond loading the page.</p>
167
174
</div>
168
175
169
176
<div class="playground card">
@@ -212,7 +219,7 @@ let rows = db.run("select count(*) from users")?;</code></pre>
212
219
</main>
213
220
214
221
<footer class="footer-strip">
215
-
<div>Runs entirely in the browser through the published WebAssembly build.</div>
222
+
<div>Runs entirely in the browser through the published <code>kite_sql@0.3.2</code> WebAssembly build.</div>
0 commit comments