PHP to D Conversion
Andre Pany
andre at s-e-a-p.de
Mon Oct 21 15:36:25 UTC 2019
On Monday, 21 October 2019 at 15:29:33 UTC, zoujiaqing wrote:
> On Friday, 18 October 2019 at 06:22:33 UTC, Vino wrote:
>> [...]
>
>
> import hunt.database;
>
> class avmtest {
>
> private Database db;
>
> this() {
> db = new
> Database("mysql://testusr:xxxx@test.srv.com:3910/test");
> }
>
> string[string][] getHostname() {
>
> string[string] data;
>
>
> foreach(row; db.query("SELECT host_name FROM hosts_coll"))
> {
> string[string] host;
> host["HostName"] = row["host_name"];
> data ~= host;
> }
>
> return data;
> }
> }
Is this database library compatible with the fiber programming
model of vibe-d?
Kind regards
Andre
More information about the Digitalmars-d-learn
mailing list