Re: [sqlite] Issue with node-sqlite3

2018-06-13 Thread Space Pixel
Hi Ryan,

I can see you didn't quite understand me. The project I am attempting to
install sqlite3 on is an Angular 6 project. Now, in the package sqlite3
there is a CS file that spits out a warning "you need an appropriate loader
to handle this file type". Also, some of the packages sqlite3 requires are
very ancient and deprecated: crypto, aws-sdk, http, https, and some more.
Now, about getting the latest version through the website- again, the
"sqlite3" that I'm talking about is a NPM package, and there is nothing to
do with finding the latest version: I already have it. Plus, when I tried
to install it without any Python or build tools, it fell back to the build
and then the build immediately FAILED. After I installed Windows Build
Tools and Python (and added it to PATH), I got it to build successfully,
but then I face the problems that I mentioned in the first mail.

Hope you understand now,

Omer Shamai.

On Wed, Jun 13, 2018, 12:52 PM R Smith  wrote:

> On 2018/06/13 10:26 AM, Space Pixel wrote:
> > Hello sqlite community,
> >
> > I am having serious trouble with the Node.js module "sqlite3". This
> package
> > is supposed to connect JavaScript or TypeScript code with a sqlite3
> > database (file or online database). When I try to use the sqlite file
> (the
> > command I am using is "const db = new sqlite3.Database("file name
> > here");"), it spits out SO many errors regarding packages that were
> > declared as deprecated and out of date so long ago. I'm gonna give a log
> > below. Notice the warnings: A .cs file spits out a warning, in which it
> > says: "You need an appropriate loader to handle this file". I tried to
> find
> > a solution for a whole month, to no avail. Please help at once.
>
> Hi Omer,
>
> The reason your messages are not being answered quick and precisely is
> that this is really not an SQLite issue, it's a CS problem and people on
> a CS forum are much more likely able to help out.  It's also possible
> that some CS user here might read it and offer assistance, but so far it
> didn't attract much attention from such Samaritans.
>
> The SQLite devs do not make deprecated systems, the stuff can be
> downloaded from the SQLite site is all up-to-date and working, so that
> means that either CS itself or the wrapper or module you use in CS, to
> use SQLite DB capabilities, is out-of-date or deprecated. We can show
> you the newest and updated sources for SQLite itself, but we cannot
> magic it into your CS project - hence me saying you are far more likely
> to get help from a CS forum since someone there is bound to have
> discovered and (hopefully) already solved this same problem.
>
> Once you get the SQLite to be understood by your CS and start using it
> and then have any problem with how it works, understands SQL or handles
> files, then we can (and would love to) fully assist.
>
> Good luck,
> Ryan
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Issue with node-sqlite3

2018-06-13 Thread Space Pixel
Hello sqlite community,

I am having serious trouble with the Node.js module "sqlite3". This package
is supposed to connect JavaScript or TypeScript code with a sqlite3
database (file or online database). When I try to use the sqlite file (the
command I am using is "const db = new sqlite3.Database("file name
here");"), it spits out SO many errors regarding packages that were
declared as deprecated and out of date so long ago. I'm gonna give a log
below. Notice the warnings: A .cs file spits out a warning, in which it
says: "You need an appropriate loader to handle this file". I tried to find
a solution for a whole month, to no avail. Please help at once.

Thank you,
   Omer Shamai.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Trigger Performance

2018-06-12 Thread Space Pixel
I'll try to do whatever I can.

On Tue, Jun 12, 2018, 8:10 PM Simon Slavin  wrote:

> On 12 Jun 2018, at 10:49am, Space Pixel  wrote:
>
> > the console
> > shows a warning, about an inappropriate loader to some C# file.
>
> There is no C# code in SQLite.  It's all plain C.  Can you show us the
> error message and tell us how it relates to you using SQLite commands ?
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Trigger Performance

2018-06-12 Thread Space Pixel
Hello SQLite,

I am having serious truble with SQLite3 in Node.js (the NPM package).

The code uses deprecated packages (such as crypto, http, https, aws-sdk)
and when I try to fix some of the (mostly) fixable problems, the console
shows a warning, about an inappropriate loader to some C# file. If
possible, please help! I am stuck with this problem for a whole month and
still no solution.

On Tue, Jun 12, 2018, 5:37 AM Keith Medcalf  wrote:

>
> Yes.  Looking up the trigger and preparing the VDBE code appears to the
> additional time spent.
>
> ---
> The fact that there's a Highway to Hell but only a Stairway to Heaven says
> a lot about anticipated traffic volume.
>
>
> >-Original Message-
> >From: sqlite-users [mailto:sqlite-users-
> >boun...@mailinglists.sqlite.org] On Behalf Of David Burgess
> >Sent: Monday, 11 June, 2018 17:50
> >To: SQLite mailing list
> >Subject: Re: [sqlite] Trigger Performance
> >
> >Trying again/
> >Specifically, preparation of the constant "trigger part" of the
> >statement is
> >the overhead? Correct?
> >
> >On Tue, Jun 12, 2018 at 9:47 AM, David Burgess 
> >wrote:
> >> Specifically, preparation of the "trigger part" of the statement is
> >> the overhead? Correct?
> >>
> >>
> >> On Mon, Jun 11, 2018 at 5:16 PM, Keith Medcalf
> > wrote:
> >>>
> >>> Okay, the difference is the "lots of inserts" -vs- the "one
> >insert".
> >>>
> >>> When I do the same thing (dump the contents of the table to a file
> >and then reload the dump), the overhead of the trigger is about 33%
> >(same as you).
> >>>
> >>> There is not only the time to "insert the data" but also the
> >overhead of preparing the statements.  In the case where the
> >statement is not prepared each time but only the single prepare with
> >multiple insertions, the time to run the VDBE code which includes the
> >trigger is only 5-10% more than to run the insertions without the
> >trigger.
> >>>
> >>> However, the overhead of preparing the statement for execution is
> >what is taking up the rest of the observed difference.
> >>>
> >>> ---
> >>> The fact that there's a Highway to Hell but only a Stairway to
> >Heaven says a lot about anticipated traffic volume.
> >>>
> >>>
> -Original Message-
> From: sqlite-users [mailto:sqlite-users-
> boun...@mailinglists.sqlite.org] On Behalf Of David Burgess
> Sent: Monday, 11 June, 2018 00:40
> To: SQLite mailing list
> Subject: Re: [sqlite] Trigger Performance
> 
> > The trigger is adding a mere 10% overhead on a million rows ...
> 3.24 on a real data DB (16 columns), the inserts were generated
> >from
> .dump in the shell, about 45MB of  input data
> so
> 
> BEGIN;
> lots of inserts
> COMMIT;
> 
> Run on a laptop i7 with SSD (not that should make any difference
> >to
> the relative performance)
> If I could get your relative performance, I would be happy.
> 
> On Mon, Jun 11, 2018 at 3:30 PM, Keith Medcalf
> >
> wrote:
> >
> > Interesting.  That is adding 30% or so to process the trigger.
> When I do (this is to a "memory" database):
> >
> > SQLite version 3.25.0 2018-06-11 01:30:03
> > Enter ".help" for usage hints.
> > Connected to a transient in-memory database.
> > Use ".open FILENAME" to reopen on a persistent database.
> > sqlite> create table crap(uuid text not null collate nocase
> unique);
> > sqlite> .timer on
> > sqlite> insert into crap select uuidStringCreateV4() from
> generate_series where start=1 and stop=100;
> > Run Time: real 1.625 user 1.625000 sys 0.00
> > sqlite> create trigger crap_trigger before insert on crap when 0
> >==
> 1
> >...> begin
> >...>  select raise(ABORT, 'abort');
> >...> end;
> > Run Time: real 0.000 user 0.00 sys 0.00
> > sqlite> .schema
> > CREATE TABLE crap(uuid text not null collate nocase unique);
> > CREATE TRIGGER crap_trigger before insert on crap when 0 == 1
> > begin
> >  select raise(ABORT, 'abort');
> > end;
> > sqlite> delete from crap;
> > Run Time: real 0.031 user 0.031250 sys 0.00
> > sqlite> insert into crap select uuidStringCreateV4() from
> generate_series where start=1 and stop=100;
> > Run Time: real 1.796 user 1.781250 sys 0.015625
> > sqlite> select (1.796-1.625)/1.625;
> > 0.105230769230769
> >
> > The trigger is adding a mere 10% overhead on a million rows ...
> >
> > I also got a result where the overhead added by the trigger was
> half that (when using an actual disk db rather than a memory db).
> >
> >>sqlite test.db
> > SQLite version 3.25.0 2018-06-11 01:30:03
> > Enter ".help" for usage hints.
> > sqlite> create table crap(uuid text not null collate nocase
> unique);
> > sqlite> .timer on
> > sqlite> insert into crap select uuidStringCreateV4() from
> generate_series where start=1 and