mirror of
https://gitea.invidious.io/iv-org/shard-crystal-sqlite3.git
synced 2024-08-15 00:53:26 +00:00
33 lines
1 KiB
HTML
33 lines
1 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8" />
|
||
|
<link href="css/style.css" rel="stylesheet" type="text/css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>crystal-sqlite3</h1>
|
||
|
|
||
|
<p>SQLite3 bindings for <a href="http://crystal-lang.org/" target="_blank">Crystal</a>.</p>
|
||
|
|
||
|
<p><strong>This is a work in progress.</strong></p>
|
||
|
|
||
|
<p><a href="http://manastech.github.io/crystal-sqlite3/" target="_blank">Documentation</a></p>
|
||
|
|
||
|
<h3>Projectfile</h3>
|
||
|
|
||
|
<pre><code>deps <span class="k">do</span>
|
||
|
github <span class="s">"manastech/crystal-sqlite3"</span>
|
||
|
<span class="k">end</span></code></pre>
|
||
|
|
||
|
<h3>Usage</h3>
|
||
|
|
||
|
<pre><code><span class="k">require</span> <span class="s">"sqlite3"</span>
|
||
|
|
||
|
db <span class="o">=</span> <span class="t">SQLite3</span><span class="t">::</span><span class="t">Database</span>.<span class="k">new</span>( <span class="s">"data.db"</span> )
|
||
|
db.execute(<span class="s">"select * from table"</span>) <span class="k">do</span> <span class="o">|</span>row<span class="o">|</span>
|
||
|
p row
|
||
|
<span class="k">end</span>
|
||
|
db.close</code></pre>
|
||
|
</body>
|
||
|
</html>
|