Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-28 Thread Laeeth Isharc via Digitalmars-d
On Sunday, 28 February 2016 at 01:55:50 UTC, Stefan Koch wrote: On Sunday, 28 February 2016 at 01:45:48 UTC, Laeeth Isharc wrote: Great project, Stefan. Any idea what kind of maximum database size will be feasible ? I realise it is early days so far and not your main focus. Laeeth The

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-27 Thread Stefan Koch via Digitalmars-d
On Sunday, 28 February 2016 at 01:45:48 UTC, Laeeth Isharc wrote: Great project, Stefan. Any idea what kind of maximum database size will be feasible ? I realise it is early days so far and not your main focus. Laeeth The limits will be almost the same as in sqlite. So a few 100TB

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-27 Thread Laeeth Isharc via Digitalmars-d
On Monday, 22 February 2016 at 03:39:57 UTC, Stefan Koch wrote: On Monday, 22 February 2016 at 03:33:27 UTC, Chris Wright wrote: On Sun, 21 Feb 2016 21:15:01 +, Stefan Koch wrote: On Sunday, 21 February 2016 at 19:55:38 UTC, Any wrote: On Sunday, 21 February 2016 at 19:21:31 UTC, Stefan

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-27 Thread Stefan Koch via Digitalmars-d
Another update : Performance is now 3 times better then with my initial version. Tip of the Day : constantly reevaluate your design-decisions.

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-26 Thread Stefan Koch via Digitalmars-d
On Friday, 26 February 2016 at 09:53:46 UTC, Stefan Koch wrote: Write support is coming! After that is finished let's see by how much I can beat sqlite dong bulk inserts. dong => doing. - anyone who wants to help bench-marking please write me. uplink DOT coder AT gmail C O M

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-26 Thread Stefan Koch via Digitalmars-d
On Monday, 22 February 2016 at 14:11:46 UTC, Stefan Koch wrote: Another small update. So far ldc has the lead in my performance test ldc2 produces significantly faster results then gdc or dmd. I will have a look at the IR and see how I can "port" the optimisations it does to the sourceCode.

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-22 Thread Stefan Koch via Digitalmars-d
Another small update. So far ldc has the lead in my performance test ldc2 produces significantly faster results then gdc or dmd. I will have a look at the IR and see how I can "port" the optimisations it does to the sourceCode.

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread Stefan Koch via Digitalmars-d
On Monday, 22 February 2016 at 03:33:27 UTC, Chris Wright wrote: On Sun, 21 Feb 2016 21:15:01 +, Stefan Koch wrote: On Sunday, 21 February 2016 at 19:55:38 UTC, Any wrote: On Sunday, 21 February 2016 at 19:21:31 UTC, Stefan Koch wrote: where n is the number of rows. That means your

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread Chris Wright via Digitalmars-d
On Sun, 21 Feb 2016 21:15:01 +, Stefan Koch wrote: > On Sunday, 21 February 2016 at 19:55:38 UTC, Any wrote: >> On Sunday, 21 February 2016 at 19:21:31 UTC, Stefan Koch wrote: >>> where n is the number of rows. >> >> That means your doing a full table scan. When the table gets large >>

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread Stefan Koch via Digitalmars-d
On Monday, 22 February 2016 at 02:52:41 UTC, Era Scarecrow wrote: Looks good! Although took me a little bit to notice the Lambda :P The result from names, surnames, once you access the entry it consumes it? That seems wrong. Hmmm is there a short example of how the left/right/natural

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread Era Scarecrow via Digitalmars-d
On Sunday, 21 February 2016 at 16:05:49 UTC, Stefan Koch wrote: just a small update on the API It could look something like this auto table = db.tables("personal"); auto results = table.select("name","surname").where!("age","sex", (age, sex) => sex.as!Sex == Sex.female, age.as!uint < 40));

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread Stefan Koch via Digitalmars-d
On Sunday, 21 February 2016 at 19:55:38 UTC, Any wrote: On Sunday, 21 February 2016 at 19:21:31 UTC, Stefan Koch wrote: where n is the number of rows. That means your doing a full table scan. When the table gets large enough, this gets problematic. When the table get's large enough you

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread Chris Wright via Digitalmars-d
On Sun, 21 Feb 2016 19:21:31 +, Stefan Koch wrote: > I don't parse anything. Right, which prevents you from using indexes.

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread Any via Digitalmars-d
On Sunday, 21 February 2016 at 19:21:31 UTC, Stefan Koch wrote: where n is the number of rows. That means your doing a full table scan. When the table gets large enough, this gets problematic.

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread WebFreak001 via Digitalmars-d
On Thursday, 18 February 2016 at 21:09:15 UTC, Stefan Koch wrote: Hello, It is not quite ready to post in Announce, but I would like to inform you that I am planing to open-source my native-sqlite database driver. (well currently it just reads them). However it works fully at CTFE. so if

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread Stefan Koch via Digitalmars-d
On Sunday, 21 February 2016 at 18:32:29 UTC, Chris Wright wrote: Or rather, parsing a query to use an index becomes exponential unless you parse X86 instructions. D doesn't let you access the contents of a lambda expression. (C# does.) So in order to evaluate the lambda, you have to invoke

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread Chris Wright via Digitalmars-d
On Sun, 21 Feb 2016 18:12:27 +, Stefan Koch wrote: > On Sunday, 21 February 2016 at 18:08:30 UTC, Chris Wright wrote: >> That means never using an index. > How so ? Or rather, parsing a query to use an index becomes exponential unless you parse X86 instructions. D doesn't let you access

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread Stefan Koch via Digitalmars-d
On Sunday, 21 February 2016 at 18:08:30 UTC, Chris Wright wrote: That means never using an index. How so ?

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread Chris Wright via Digitalmars-d
On Sun, 21 Feb 2016 16:05:49 +, Stefan Koch wrote: > just a small update on the API It could look something like this > > auto results = table.select("name","surname").where!("age","sex", > (age, sex) => sex.as!Sex == Sex.female, age.as!uint < 40)); That means never using an index.

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-21 Thread Stefan Koch via Digitalmars-d
just a small update on the API It could look something like this auto table = db.tables("personal"); auto results = table.select("name","surname").where!("age","sex", (age, sex) => sex.as!Sex == Sex.female, age.as!uint < 40)); auto names = results[0].as!string; auto surnames =

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-19 Thread Andrei Alexandrescu via Digitalmars-d
On 2/19/16 11:03 AM, Stefan Koch wrote: On Friday, 19 February 2016 at 01:28:11 UTC, Andrei Alexandrescu wrote: That's very exciting! Are you planning a DConf talk on the topic? -- Andrei I would love to give a talk on this. Submission deadline is Feb 29. -- Andrei

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-19 Thread Stefan Koch via Digitalmars-d
On Friday, 19 February 2016 at 16:20:50 UTC, Stefan Koch wrote: On Friday, 19 February 2016 at 06:40:08 UTC, Era Scarecrow wrote: Interesting... I'd almost want a page with the ddoc information to glance over the API, and a couple code snippets of how you'd see it working. I'll look

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-19 Thread Stefan Koch via Digitalmars-d
On Friday, 19 February 2016 at 06:40:08 UTC, Era Scarecrow wrote: Interesting... I'd almost want a page with the ddoc information to glance over the API, and a couple code snippets of how you'd see it working. I'll look forward to seeing this when it's out :) Well I can do that :)

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-19 Thread Stefan Koch via Digitalmars-d
On Friday, 19 February 2016 at 01:28:11 UTC, Andrei Alexandrescu wrote: That's very exciting! Are you planning a DConf talk on the topic? -- Andrei I would love to give a talk on this.

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-18 Thread Era Scarecrow via Digitalmars-d
On Thursday, 18 February 2016 at 21:09:15 UTC, Stefan Koch wrote: I am planing to open-source my native-sqlite database driver. (well currently it just reads them). However it works fully at CTFE. Interesting... I'd almost want a page with the ddoc information to glance over the API, and a

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-18 Thread Andrei Alexandrescu via Digitalmars-d
On 02/18/2016 04:09 PM, Stefan Koch wrote: Hello, It is not quite ready to post in Announce, but I would like to inform you that I am planing to open-source my native-sqlite database driver. (well currently it just reads them). However it works fully at CTFE. so if you want to you can extract

Re: [WIP] Native SQLite Database reader (works at CTFE)

2016-02-18 Thread Márcio Martins via Digitalmars-d
On Thursday, 18 February 2016 at 21:09:15 UTC, Stefan Koch wrote: Hello, It is not quite ready to post in Announce, but I would like to inform you that I am planing to open-source my native-sqlite database driver. (well currently it just reads them). However it works fully at CTFE. so if

[WIP] Native SQLite Database reader (works at CTFE)

2016-02-18 Thread Stefan Koch via Digitalmars-d
Hello, It is not quite ready to post in Announce, but I would like to inform you that I am planing to open-source my native-sqlite database driver. (well currently it just reads them). However it works fully at CTFE. so if you want to you can extract sourceCode out of a sql-database and