Skip to content

Commit

Permalink
basic header docs of all public modules
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdruppe committed Dec 7, 2019
1 parent 8d57ff1 commit 0637053
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion curl.d
@@ -1,4 +1,4 @@
/// curl wrapper, it sux
/// My old curl wrapper. Use [arsd.http2] instead on newer projects, or [std.net.curl] in Phobos if you don't trust my homemade implementations :)
module arsd.curl;

// see this for info on making a curl.lib on windows:
Expand Down
18 changes: 17 additions & 1 deletion database.d
@@ -1,4 +1,20 @@
///
/++
Generic interface for RDBMS access. Use with one of the implementations in [arsd.mysql], [arsd.sqlite], [arsd.postgres], or [arsd.mssql]. I'm sorry the docs are not good, but a little bit goes a long way:
---
auto db = new Sqlite("file.db"); // see the implementations for constructors
// then the interface, for any impl can be as simple as:
foreach(row; db.query("SELECT id, name FROM people")) {
string id = row[0];
string name = row[1];
}
db.query("INSERT INTO people (id, name) VALUES (?, ?)", 5, "Adam");
---
To convert to other types, just use [std.conv.to] since everything comes out of this as simple strings.
+/
module arsd.database;

// I should do a prepared statement as a template string arg
Expand Down

0 comments on commit 0637053

Please sign in to comment.