Simon Slavin wrote:
> On 16 Jun 2012, at 3:01am, sohu wrote:
>
>> I have a sql file, and I know in sqlite use .read my.sql to run sql cmd,but
>> I don't know how to run the sql file in c++?
>
> There is no way to do it in one command.
Well, for a reasonably sized file, you could just read the
On 16 Jun 2012, at 3:01am, sohu wrote:
> I have a sql file, and I know in sqlite use .read my.sql to run sql cmd,but I
> don't know how to run the sql file in c++?
There is no way to do it in one command. You can write your own C++ code to
read the text file one line at a time and call sqlit
I have a sql file, and I know in sqlite use .read my.sql to run sql cmd,but I
don't know how to run the sql file in c++?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Etienne wrote:
> R:\>sqlite NUL "select 0.1;"
> 0.1
>
>
> JSDB (www.jsdb.org) output:
>
> js>var db = new SQLite();
> js>db.exec("select 0.1", function(r){writeln(r)});
> 0.1=0.11
> true
>
>> You are not doing the same thing both
select *
from (select *
from hbc
order by cmc desc
limit 10) as ss
union
select *
from hbc
where qph>0
or hctl=1;
---
() ascii ribbon campaign against html e-mail
/\ www.asciiribbon.org
> -Original Message-
> From: sqlite-users-boun.
SQLite does not create the thread.
The application creates the thread and then runs the async writer on that
application created thread.
---
() ascii ribbon campaign against html e-mail
/\ www.asciiribbon.org
> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqli
> > The problem is: the "real" rounding error depends here on the shell (SQLite
> > or JSDB) calling the SQLite library.
> Yes. Different languages use different ways to hide the fact that they can't
> hide the 0.1.
The difference of languages is irrelevant here.
Both shells call "SQLITE_API
On Fri, Jun 15, 2012 at 06:32:51AM +0200, Etienne scratched on the wall:
> The problem is: the "real" rounding error depends here on the shell
> (SQLite or JSDB) calling the SQLite library.
This shouldn't be a surprise. The core SQLite API is expecting a
64-bit binary number. That's what go
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 15/06/12 03:01, Christian Smith wrote:
> Except when the asynchronous IO module is used:
> http://www.sqlite.org/asyncvfs.html
>
> This VFS module will create a single background IO thread.
No it doesn't. You have to create the thread for the b
On Fri, Jun 15, 2012 at 12:42:45PM +, Black, Michael (IS) scratched on the
wall:
> But as somebody pointed out if you muck with database from the shell or
> any other program it will die with "function not found" if the trigger
> is called.
>
> Ergo a dummy function to make it happy and non-f
Black, Michael (IS) wrote:
> Looks like that is getting close...but when is this called? BEFORE or AFTER?
After, as far as I can tell.
--
Igor Tandetnik
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/list
Understood. Thank you very much for your quick help. Now I have all the
information I need to get coding. And thanks once again for a great library!
Kind regards,
Philip Bennefall
- Original Message -
From: Richard Hipp
To: phi...@blastbay.com ; General Discussion of SQLite Datab
On Fri, Jun 15, 2012 at 9:26 AM, Philip Bennefall wrote:
> I understand that, but let's say that I already have a virtual fts table
> created that I set to use the Porter tokenizer, how then would I go about
> rebuilding and retokenizing this table with the simple tokenizer at a later
> time? Woul
Looks like that is getting close...but when is this called? BEFORE or AFTER?
And you also wouldn't know which trigger got calledonly which table was
touched.
The dummy function would solve both those problems.
So I can still see an sqlite3_callback() either overloaded or a function
I understand that, but let's say that I already have a virtual fts table
created that I set to use the Porter tokenizer, how then would I go about
rebuilding and retokenizing this table with the simple tokenizer at a later
time? Would I need to create an entirely new table? What I'm wondering is
Bageesh.M.Bose wrote:
> Can anyone tell "How to use Triggers in Sqlite using C"
What do you mean by "use triggers", exactly? What are you trying to achieve?
If you are asking how to create a trigger, then it's the same way as creating a
table - you open a database connection (with sqlite3_open
Black, Michael (IS) wrote:
> Could the SQLite code add a new dummy function for a callback which we can
> then override with our own library?
sqlite3_update_hook
--
Igor Tandetnik
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.or
On Fri, Jun 15, 2012 at 9:00 AM, Philip Bennefall wrote:
> I had another quick question. If I have built an fts table using the
> stemmer tokenizer, and then I later decide that I want to change to the
> simple one, is there an easy way to do this? I see the "rebuild" command,
> can I somehow tell
YAN HONG YE wrote:
> select * from hbc order by cmc desc limit 10
> union
> select * from hbc where qph>0
> union
> select * from hbc where hctl=1
>
> this sql cmd cause the error:
> order by clause should come after union not before
select * from hbc where rowid in (select rowid from hbc order
I had another quick question. If I have built an fts table using the stemmer
tokenizer, and then I later decide that I want to change to the simple one, is
there an easy way to do this? I see the "rebuild" command, can I somehow tell
that to change the tokenizer as well? I see the reference to c
But as somebody pointed out if you muck with database from the shell or any
other program it will die with "function not found" if the trigger is called.
Ergo a dummy function to make it happy and non-fatal.
Michael D. Black
Senior Scientist
Advanced Analytics Directorate
Advanced GEOINT So
On Fri, Jun 15, 2012 at 08:10:20AM -0400, Kevin Benson scratched on the wall:
> On Fri, Jun 15, 2012 at 5:56 AM, YAN HONG YE wrote:
> >
> > select * from hbc order by cmc desc limit 10
> > union
> > select * from hbc where qph>0
> > union
> > select * from hbc where hctl=1
> >
> > this sql cmd ca
On Fri, Jun 15, 2012 at 12:12:22PM +, Black, Michael (IS) scratched on the
wall:
> Could the SQLite code add a new dummy function for a callback which
> we can then override with our own library?
Just use an SQL function:
http://sqlite.org/c3ref/create_function.html
-j
--
Jay A. Kr
I use Ruby. In the following example I use a replacement tag "#{lvl}" in
the scripts. For each of the levels (indv,hhld,resi), I do a substitution
against the script and pass the script to sqlite.
dbname =
File.join('d:','cloveretl','projects','test_ii','data-out-97','test.db')
db = SQLite3::Dat
On 15 Jun 2012, at 5:32am, Etienne wrote:
> That said... the rounding error ITSELF is not the point.
>
> The problem is: the "real" rounding error depends here on the shell (SQLite
> or JSDB) calling the SQLite library.
Yes. Different languages use different ways to hide the fact that they c
Could the SQLite code add a new dummy function for a callback which we can then
override with our own library?
That would provide an easy-to-use interface which would then still work in the
shell (unless you're doing some other database functions inside the callback --
coider beware).
e.g.
On Fri, Jun 15, 2012 at 5:56 AM, YAN HONG YE wrote:
>
> select * from hbc order by cmc desc limit 10
> union
> select * from hbc where qph>0
> union
> select * from hbc where hctl=1
>
> this sql cmd cause the error:
> order by clause should come after union not before
>
http://www.sqlite.org/lan
On 15 Jun 2012, at 10:56am, YAN HONG YE wrote:
> select * from hbc order by cmc desc limit 10
> union
> select * from hbc where qph>0
> union
> select * from hbc where hctl=1
>
> this sql cmd cause the error:
> order by clause should come after union not before
Yes. The UNION clauses you're
Thanks, Richard. That's good to know because I am trying to decide whether to
add a new tokenizer with some custom processing, as opposed to using the built
in stemmer.
Kind regards,
Philip Bennefall
- Original Message -
From: Richard Hipp
To: phi...@blastbay.com ; General Discu
On Fri, Jun 15, 2012 at 5:51 AM, Philip Bennefall wrote:
> Hi all,
>
> Is the algorithm used in the stemming tokenizer in SqLite's fts extension
> equivalent to the C implementation found at
> http://tartarus.org/~martin/PorterStemmer/
>
The built-in Porter stemmer is a copy/paste from the above
Hi, all!
Final reminder! Please get in touch soon if you wish to partake. We still
have plenty of slots free...
@Those who have gotten in touch: i will send you the exact address and
whatnot within the next two weeks. The timeframe is not yet set, but i
expect it will be more or less a full-day t
On 15 Jun 2012, at 10:45, Udi Karni wrote:
> Niall - thanks. If I understand correctly - you use bash to do the
> preprocessing of the substitutions and submit the prepared statements to
> Sqlite.
Well, 'prepared' is not the term I would use, as it has a specific
meaning in the c
On Thu, Jun 14, 2012 at 06:27:17AM -0400, Richard Hipp wrote:
> On Thu, Jun 14, 2012 at 2:41 AM, vallur raghava reddy <
> vallur.raghavare...@gmail.com> wrote:
>
>
> > 2. Does SQLite create a any threads? If YES, how many will be created?
> >
>
> SQLite does not create threads.
>
Except when
select * from hbc order by cmc desc limit 10
union
select * from hbc where qph>0
union
select * from hbc where hctl=1
this sql cmd cause the error:
order by clause should come after union not before
___
sqlite-users mailing list
sqlite-users@sqlite.or
On Fri, Jun 15, 2012 at 11:59:33AM +0530, Bageesh.M.Bose wrote:
> Can anyone tell "How to use Triggers in Sqlite using C"
>
Triggers in SQLite can only contain SQL DML statements. But, you can
interface with C by defining functions, then calling those functions
using SQL SELECT command.
For exam
Hi all,
Is the algorithm used in the stemming tokenizer in SqLite's fts extension
equivalent to the C implementation found at
http://tartarus.org/~martin/PorterStemmer/
?
I am asking this because some sources say that there are improved versions of
this algorithm released much later than 2000
Niall - thanks. If I understand correctly - you use bash to do the
preprocessing of the substitutions and submit the prepared statements to
Sqlite.
On Fri, Jun 15, 2012 at 1:48 AM, Niall O'Reilly wrote:
>
> On 14 Jun 2012, at 22:16, Udi Karni wrote:
>
> > Is there a way to run SQL scripts in the
On 14 Jun 2012, at 22:16, Udi Karni wrote:
> Is there a way to run SQL scripts in the Shell with parameters?
>
> Something like this?
>
> set &YEAR = 2010
>
> SELECT COUNT (*) FROM TABLE WHERE YEAR = &YEAR ;
>
> ???
I use bash and sqlite3, as in the fragment below.
#!/bin/bash
# qu
38 matches
Mail list logo