Re: [sqlite] SQLite3_create_collation

2014-04-02 Thread James Berry
On Apr 2, 2014, at 7:28 AM, Donald Steele wrote: > Greetings I am an iOS developer that is much more comfortable with iOS than > SQLite. I have an iOS app that uses a database with several tables. These > table the app user uses as directories. The user moves from screen

Re: [sqlite] SQLite3_create_collation

2014-04-02 Thread James Berry
On Apr 2, 2014, at 7:36 AM, James Berry <ja...@jberry.us> wrote: > On Apr 2, 2014, at 7:28 AM, Donald Steele <xln...@sbcglobal.net> wrote: > >> I read some where in my searches that Apple has “canned” versions of that >> method but I can’t find those either.

Re: [sqlite] SQLite3_create_collation

2014-04-02 Thread James Berry
On Apr 2, 2014, at 1:12 PM, Donald Steele wrote: > Correct. I’m using basically SQLite’s Obj C APIs. the SQLite3 framework is > built into X code which saves set up time at the beginning. There are no built-in Obj-C APIs to SQLite. Are you using Core Data, which is an

Re: [sqlite] SQLite3_create_collation

2014-04-02 Thread James Berry
On Apr 2, 2014, at 1:26 PM, Donald Steele wrote: > What I’m talking about that is part of Xcode is the SQLite framework not > APIs. The access to SQLite is done with the Obj C APIs as defined by SQLite. > I am a fairly new developer and may be having some problems

[sqlite] Improve documentation of collation callback?

2014-04-03 Thread James Berry
Documentation of the parameters to the collation callback could be improved: (http://www.sqlite.org/c3ref/create_collation.html) (1) A function prototype for the callback with named parameters is not given, so one has to guess what the parameters are used for. (2) It’s also not

[sqlite] strftime function: requesting %U support

2011-05-17 Thread James Berry
It would be neat if the sqlite strftime function could support the %U conversion, to give Week of Year, where a week starts on Sunday. As it is, there's a bit of an impedance mismatch, as %w gives day of week where 0 == Sunday, but the supported %W conversion gives Week of Year, where week

[sqlite] apple-osx branch

2011-05-19 Thread James Berry
Richard, Looking at the development timeline, apple-osx branch jumps out recently, and raises some questions for me: (1) If we're building sqlite for delivery on os-x, should we be using code from that branch, rather than the regular distribution? (2) If yes to 1, then does that also apply

Re: [sqlite] iPhone iOS 3.1.3 Sqlite3 Crashes Unless Compiled Without Optimizations

2011-11-03 Thread James Berry
I've seen this same problem. It crashes seemingly due to bugs in llvm-clang when compiled for arm6 if, as you say, optimizations at any level are turned on. I've worked around this issue by turning off optimizations for arm6. Sqlite3, by the way, is not the only bit of my iOS app that

Re: [sqlite] iPhone iOS 3.1.3 Sqlite3 Crashes Unless Compiled Without Optimizations

2011-11-03 Thread James Berry
On Nov 3, 2011, at 6:19 AM, James Berry wrote: > I've seen this same problem. It crashes seemingly due to bugs in llvm-clang > when compiled for arm6 if, as you say, optimizations at any level are turned > on. I've worked around this issue by turning off optimizations for arm6.

Re: [sqlite] sqlite 3.7.8 and sqlite 3.7.9 crash with Apple Xcode 4.2.1 on armv6 ios device

2011-11-30 Thread James Berry
Gilles, This is due to bugs in llvm when compiling for arm6 with thumb mode enabled. Passing -mno-thumb to the compiler will solve the problem. James On Nov 30, 2011, at 4:31 PM, Gilles Vollant wrote: > Hello, > > I'm using a recompiled version of SQLite in one project (I need FTS3 and now >

Re: [sqlite] sqlite 3.7.8 and sqlite 3.7.9 crash with Apple Xcode 4.2.1 on armv6 ios device

2011-11-30 Thread James Berry
(you only need to turn off thumb mode for the arm6 architecture) -jdb On Nov 30, 2011, at 8:02 PM, James Berry wrote: > Gilles, > > This is due to bugs in llvm when compiling for arm6 with thumb mode enabled. > Passing -mno-thumb to the compiler will solve the problem. > >

Re: [sqlite] sqlite 3.7.8 and sqlite 3.7.9 crash with Apple Xcode 4.2.1 on armv6 ios device

2011-12-01 Thread James Berry
ards > Gilles Vollant > > > Le jeudi 1 décembre 2011, James Berry <ja...@jberry.us> a écrit : >> Gilles, >> >> This is due to bugs in llvm when compiling for arm6 with thumb mode > enabled. Passing -mno-thumb to the compiler will solve the problem. >>

[sqlite] Effect of commit transaction while in process of sqlite3_step'ing?

2011-01-19 Thread James Berry
I'm trying to understand whether there's any problem with committing a transaction while in the process of stepping over results. The following loop, in some kind of weird hybrid pseudo-code, tries to illustrate what I'm doing: while stepping over results from a select statement, doing inserts

Re: [sqlite] Effect of commit transaction while in process of sqlite3_step'ing?

2011-01-19 Thread James Berry
On Jan 19, 2011, at 9:43 AM, Igor Tandetnik wrote: > On 1/19/2011 12:35 PM, James Berry wrote: >> I'm trying to understand whether there's any problem with committing a >> transaction while in the process of stepping over results. > > I believe COMMIT would fail while th

Re: [sqlite] Effect of commit transaction while in process of sqlite3_step'ing?

2011-01-19 Thread James Berry
On Jan 19, 2011, at 10:03 AM, Richard Hipp wrote: > On Wed, Jan 19, 2011 at 12:35 PM, James Berry <ja...@jberry.us> wrote: > >> I'm trying to understand whether there's any problem with committing a >> transaction while in the process of stepping over results

[sqlite] Deleting the sqlite journal file?

2011-01-21 Thread James Berry
I ran into an interesting problem today having to do with a left-over journal file. When I first initialize my app, my general strategy is this: - Delete src.db, tmp.db, dst.db - Copy a static copy of my database (src.db) to a well-known temporary place (tmp.db). - Make

Re: [sqlite] Deleting the sqlite journal file?

2011-01-21 Thread James Berry
Richard, On Jan 21, 2011, at 5:41 PM, Richard Hipp wrote: > On Fri, Jan 21, 2011 at 8:27 PM, James Berry <ja...@jberry.us> wrote: > >> (1) Is there any API I can/should use to predictably get the name of >> the journal file so that I can delete it, without

[sqlite] contribution: fts3 porter stemmer enhancements to handle common european accents

2010-01-27 Thread James Berry
I'd like to contribute for potential inclusion, or to help out others in the community, a small set of enhancements I've made to the porter tokenizer. This implementation shares most of its code with the current porter tokenizer, as the changes are really just in the tokenizer prior to the

[sqlite] Bug in porter stemmer

2010-02-22 Thread James Berry
I'm writing to report a bug in the porter-stemmer algorithm supplied as part of the FTS3 implementation. The stemmer has an inverted logic error that prevents it from properly stemming words of the following form: dry -> dri cry -> cri This means, for instance, that the

Re: [sqlite] Bug in porter stemmer

2010-02-24 Thread James Berry
will just be forgotten others, as well as by me. How does this bug move from a message on a list to a ticket (and ultimately a patch, we hope) in the system? James On Feb 22, 2010, at 2:51 PM, James Berry wrote: > I'm writing to report a bug in the porter-stemmer algorithm supplied as p

Re: [sqlite] Bug in porter stemmer

2010-02-24 Thread James Berry
ot; if you like, and link it in for use in your > applications. We will also investigate making your recommended > changes for FTS4. However, in order to maintain backwards > compatibility of FTS3, we cannot change the stemmer algorithm, even to > fix a "bug". > >

[sqlite] fts4 contentless tables, multiple inserts to same doc id?

2013-02-01 Thread James Berry
Is the following intended to be legal and possible for a contentless fts table: to do multiple inserts with the same docid, but to different columns? It seems to work, and I like it, but it wasn't entirely expected. sqlite> CREATE VIRTUAL TABLE t1 USING fts4(content="", a, b); sqlite> INSERT

Re: [sqlite] Hints for the query planner

2013-09-10 Thread James Berry
On Sep 10, 2013, at 12:26 PM, Richard Hipp wrote: > SURVEY QUESTION: > > The question for today is what to call this magic hint function: > > (1) unlikely(EXPR) > (2) selective(EXPR) > (3) seldom(EXPR) > (4) seldom_true(EXPR) > (5) usually_not_true(EXPR) > > Please feel

[sqlite] Pragma default_synchronous?

2004-12-23 Thread James Berry
PRAGMA default_synchronous doesn't seem to have any effect on my sqlite 3.0.8 installation. PRAGMA default_synchronous; doesn't return a result in the sqlite3 shell, and PRAGMA default_synchronous=OFF doesn't seem to have any effect, either. In contrast, PRAGMA synchronous does seem to be

Re: [sqlite] Pragma default_synchronous?

2004-12-23 Thread James Berry
On Dec 23, 2004, at 4:41 PM, D. Richard Hipp wrote: PRAGME default_sychronous went away with version 3. Thanks. Ah, a documentation bug. -jdb

[sqlite] Questions about binding

2004-12-23 Thread James Berry
I'm somewhat confused by binding in the C++ interface. The documentation seems not to be entirely consistent. My questions fall into several areas: (1) Form of wildcards: ? ?N :N: $N At various places in the documentation, all of these seem to be mentioned, though not all consistently. At

Re: [sqlite] Questions about binding

2004-12-24 Thread James Berry
t should really be something like "parameter number" as I've used it above, since index to me implies the index of the parameter reference within the SQL. James On Dec 24, 2004, at 8:25 AM, Dennis Cote wrote: James Berry wrote: (1) Form of wildcards: ? ?N :N: $N At various pla

Re: [sqlite] Questions about binding

2004-12-24 Thread James Berry
On Dec 24, 2004, at 9:56 AM, Dennis Cote wrote: James Berry wrote: I think I was most confused by was the use of the word "index" in the documentation where associated with the bind calls. Index is a misnomer. It should really be something like "parameter number" as I've used i

Re: [sqlite] table locked?

2005-01-04 Thread James Berry
On Dec 31, 2004, at 9:11 AM, Thomas Fjellstrom wrote: On December 31, 2004 06:37 am, D. Richard Hipp wrote: Even in version 3.0.8, if you have a query running on a table that has not yet returned SQLITE_DONE, then you are prohibited from making changes to that table. So something as simple as:

Re: [sqlite] ? placeholder not allowed in LIMIT or OFFSET clause of SELECT statement?

2005-02-01 Thread James Berry
Eric, No, you're not missing anything. I asked this same question about a month ago. Dr. Hipp replied that argument substitution is not allowed in those cases, because it's allowed only where any of the datatypes allowed for substitution would be legal (blob, int, string, null). As limit and

Re: [sqlite] sluggish operation on os x?

2005-02-21 Thread James Berry
On Feb 21, 2005, at 9:40 AM, Curtis King wrote: I noticed this as well, so I profiled my call and found sync was taking forever. I removed the following fcntl call, rc = fcntl(fd, F_FULLFSYNC, 0);. Performance was back to normal. Here are some comments about F_FULLFSYNC, off the darwin list just

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread James Berry
On Apr 15, 2005, at 4:16 PM, D. Richard Hipp wrote: On Fri, 2005-04-15 at 15:49 -0700, Cory Nelson wrote: It seems when a bind a string to "attach ? as dbname", it is never translated into the final statement. Is this supposed to happen? SQLite only allows bound parameters in places where it is

Re: [sqlite] Bound parameters not working with prepared statement

2005-04-15 Thread James Berry
On Apr 15, 2005, at 4:02 PM, Clay Dowling wrote: James Berry wrote: It would be useful to use bound parameters in such cases. Might it make sense to coerce the value at runtime into a string value in such a case? I believe a similar restriction (ticket #1096: limit and offset) was recently

Re: [sqlite] SQLite on Tiger.

2005-05-02 Thread James Berry
On Apr 29, 2005, at 4:06 PM, Bill Bumgarner wrote: Tiger ships with SQLite 3.1.3 + a couple of tweaks. Specifically, the SQLite3 on Tiger supports locking on network filesystems, including AFP and Samba. Have these enhancements been published in the form of patches that might be considered