Re: [sqlite] Compile test example problem

2009-10-02 Thread Jean-Christophe Deschamps
Gidday, Building sqliteFirst.obj. Building SQLiteFirst.exe. POLINK: error: Unresolved external symbol '_sqlite3_open'. POLINK: error: Unresolved external symbol '_sqlite3_errmsg'. POLINK: error: Unresolved external symbol '_sqlite3_close'. POLINK: error: Unresolved external symbol

Re: [sqlite] feature request - field exclusion list in select list

2009-09-27 Thread Jean-Christophe Deschamps
Darren, At 02:19 28/09/2009, you wrote: ´¯¯¯ So my proposed select list minuend is identical to the old select sublist, and my addition is the optional EXCEPT plus list of not derived columns. Note that I'm not stuck on the keyword EXCEPT, but it should be a word that reads similarly. `--- I

Re: [sqlite] feature request - field exclusion list in select list

2009-09-27 Thread Jean-Christophe Deschamps
Oops, let me try again! SELECT ALLBUT foo FROM t ... Typing error! Should be SELECT * ALLBUT foo FROM t ... Could be as well SELECT * BUTNOT foo, bar FROM t ... The risk seems much higher with words like SAFE or WITHOUT, which perhaps have greater probability of being used in some fuure

Re: [sqlite] Viewer for blobs in hex?

2009-09-21 Thread Jean-Christophe Deschamps
Yan, I would like to display the contents of blobs in my table as hexadecimal. I have not found any easy way of doing this. I tried : Give SQLite Expert a try. There are both free and Pro version available at http://www.sqliteexpert.com/index.html Free version has no hassle license, no expiry,

Re: [sqlite] Indexes problem in unicode extension support

2009-09-18 Thread Jean-Christophe Deschamps
Alexey, I'm using extension for base unicode support (http://mobigroup.ru/files/sqlite-ext/unicode/), but in last two releases find the problem with indexes by columns with redefined NOCASE collation This code has many problems and the version on your site (the same version is available

Re: [sqlite] Multi-master replication through UPDATE and INSERT logging?

2009-09-17 Thread Jean-Christophe Deschamps
At 18:56 17/09/2009, you wrote: ´¯¯¯ % 99+% of the time, there won't be two updates at the same time. In other words, copy 1's change will almost always propagate to copy 2 before copy 2 does another update. `--- The devil is in the 1% and the almost of course. But what do you and other

Re: [sqlite] Temporal SQLite database

2009-09-16 Thread Jean-Christophe Deschamps
Doug, At 19:47 15/09/2009, you wrote: ´¯¯¯ I'm not sure if you are looking to make a entry unique, or determine the order in which the entries occurred. In either case, be aware - time can go *backwards* on a system, especially if it is being syncd to an outside source such as with NTP.

Re: [sqlite] one liner for insert or update ?

2009-09-14 Thread Jean-Christophe Deschamps
I tried twice to post it but it seems it didn't find its way to the list. Sorry if ever it gets dupped. Hi, insert or replace deletes all rows that weren't specified in the query Do you have a short example where INSERT OR REPLACE INTO ... can be shown to actually _delete_ rows? Which query

Re: [sqlite] one liner for insert or update ?

2009-09-14 Thread Jean-Christophe Deschamps
At 01:29 14/09/2009, you wrote: ´¯¯¯ CREATE TABLE table1( id INTEGER PRIMARY KEY ON CONFLICT REPLACE, field1 TEXT ); but I think that the table has to already have been created this way. `--- Yes from what he said, I also believe this is the right and simplest way.

Re: [sqlite] one liner for insert or update ?

2009-09-14 Thread Jean-Christophe Deschamps
At 10:25 14/09/2009, you wrote: ´¯¯¯ sorry, i meant columns not rows, whet i do insert command, specifying existing id and only some of the columns then the rest of the columns are deleted on the other hand, UPDATE command won't allow me to insert a new row Then you can still do something along

Re: [sqlite] one liner for insert or update ?

2009-09-13 Thread Jean-Christophe Deschamps
´¯¯¯ INSERT INTO 'mytable' (key, 'visitorcount', 'visitdate') VALUES (123456789, 1, NOW()) ON DUPLICATE KEY UPDATE 'visitorcount' = 'visitorcount' + 1 the key statement being: ON DUPLICATE KEY UPDATE not tested but it seems like that is what you are looking for. Its sometimes refered to

Re: [sqlite] Problems encountered on upgrade from SQLite2 to -3

2009-09-03 Thread Jean-Christophe Deschamps
Umm, At 05:16 03/09/2009, you wrote: ´¯¯¯ Thanks for reminding me: A thing's value is generally proportional to its cost. And the attitude of its support team figures in there, too. -R. Whether _you_ consider them problems or not, they were certainly problems for me, migrating a working

Re: [sqlite] load extension -- unload hook?

2009-09-01 Thread Jean-Christophe Deschamps
Hi, ´¯¯¯ 2. Following up on windows dllmain info - which was very useful in itself - but since we use both windows and linux, I checked the equivalent for linux as well and yes, luckily, gcc allows you to define a 'function attribute' called 'constructor' and 'destructor' which can be used to

Re: [sqlite] load extension -- unload hook?

2009-08-31 Thread Jean-Christophe Deschamps
At 18:25 30/08/2009, you wrote: ´¯¯¯ When we load an extension it invokes sqlite3_extension_init(). Lets say, in addition to creating functions, the loaded extension library also does some internal data structure allocations, initializations etc here. Now, when the database is closed the

Re: [sqlite] Using SQLite for GIS Application

2009-08-23 Thread Jean-Christophe Deschamps
I want to use SQLite in a GIS application where I create a database containing terrain data (coordinates, height). I would like to query this database with start and end points of a line and get a vector with all heights point along this line. I can, of course create a query for each point along

Re: [sqlite] (no subject)

2009-08-21 Thread Jean-Christophe Deschamps
Hi Pavel, ´¯¯¯ So conversion between wchar_t and UCS-2 encoding is not always as easy as you can think. `--- Is there really anyone using UCS-2 now or did you mean UTF-16? ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] DateTime comparison with custom format

2009-08-21 Thread Jean-Christophe Deschamps
´¯¯¯ (btw it's the standard datetime format in germany, not custom-designed :-P) `--- I see this as a confusion between a storage/computational format and human interface representation. US standard for date is also completely awkward MM/DD/ as well as most european (german for you,

Re: [sqlite] (no subject)

2009-08-21 Thread Jean-Christophe Deschamps
´¯¯¯ No, I meant exactly UCS-2. Because UCS-2 guarantees that all symbols are represented by 2 bytes when UTF-16 does not. And I had an understanding that Doug said about this 16-bit guarantee. Also if we're talking about encoding where any character can be represented by a single variable of

[sqlite] Advice needed for fuzzy search

2009-07-02 Thread Jean-Christophe Deschamps
Hello group, I'm writing a fuzzy search extension. The current code is getting a little messy and I'm not completely satisfied by the way it works. So I'm about to rewrite it from scratch on stronger foundations. The goal is to provide a fuzzy search on _short_ fields like names, street

Re: [sqlite] Advice needed for fuzzy search

2009-07-02 Thread Jean-Christophe Deschamps
Simon, At 15:26 02/07/2009, you wrote: ´¯¯¯ What we need is a new version of Soundex which is written to deal with unicode instead of ASCII. `--- Umm, soundex already fails often with plain english names. It would need a whole lot of native speakers of all those languages around to come up

Re: [sqlite] Near misses

2009-06-26 Thread Jean-Christophe Deschamps
At 13:25 26/06/2009, you wrote: ´¯¯¯ I am trying to find words in a dictionary stored in sqlite, and trying a near miss approach. For that I tried an algorithm to create patterns corresponding to Levenshtein distance of 1 (edit distance of 1). That means, one adition, one remotion or one

[sqlite] sqlite3_auto_extension

2009-06-19 Thread Jean-Christophe Deschamps
Hi Nico, Thank you for your answer. It's obvious from the function prototype (no DLL/DSO file name argument). Yes, of course. I'm not confusing a string holding a filename and a function pointer! However, you can use sqlite3_load_extension() instead per-DB connection, OR, you can even do the

[sqlite] sqlite3_auto_extension

2009-06-18 Thread Jean-Christophe Deschamps
Hi, Having spent some time trying to have this function work with dll extensions, I've come to the [I hope 'wrong'] conclusion that it's unusable in such case. Indeed, the docs mentions statically linked extension. Can someone confirm it won't auto load extensions when they reside in

[sqlite] Allowable SQLite calls during sqlite3_extension_init ?

2009-06-13 Thread Jean-Christophe Deschamps
Hi everyone, Is it possible to invoke SQLite functions while INITing a loadable extension? I ask because I need to know if the design I've in mind is at all possible. It needs to issue a very simple select on an already opened DB and fetch one row of data, which could all be done with

[sqlite] Allowable SQLite calls during sqlite3_extension_init ?

2009-06-13 Thread Jean-Christophe Deschamps
Dear Igor, Thank you _so_ much for comforting hat part of the idea I have in mind. I have another related question and I hope you or some other guru can point me towards a solution. I use SQLite from some interpreted script language under XP (yes I know). Today's PCs are fast enough to

[sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-11 Thread Jean-Christophe Deschamps
Hello group, I'd like to have the group opinion about a feature I would find utterly useful in _standard_ SQLite. Here's a rewrite of mails sent to hwaci about it, without success so far. Note: I guess that non pure ASCII characters in the sample strings below will translate to '?', but you

[sqlite] Proposal for SQLite and non pure ASCII letters

2009-03-11 Thread Jean-Christophe Deschamps
Roger, You are aware that standard SQLite is used in devices with a few kilobytes of memory through workstations and servers with gigabytes of it! That's precisely why such approach is interesting! As far as I can tell you want some extra standard collation sequences and propose shortcuts

<    1   2   3   4