[sqlite] Safe use of custom collations that are not available in all tools
How about coding the collation in C and statically linking it into the SQLite library you provide with your application? -Urspr?ngliche Nachricht- Von: Gerry Snyder [mailto:mesmerizerfan at gmail.com] Gesendet: Dienstag, 17. M?rz 2015 18:02 An: 'General Discussion of SQLite Database' Betreff: [sqlite] Safe use of custom collations that are not available in all tools In one of my tables I need a collation that is an extension of NOCASE (it ignores spaces and punctuation, translates a very limited set of accented characters into their unaccented forms). I wrote it in Tcl, and it works well in my tools. At first I used the collation only in SELECT statements, but more than once I failed to specify it and did not get the desired ordering (of course). So, I put the collation in the column definition in the table definition. This works perfectly in my s/w, but other tools complain about a missing collation. So, two questions: 1) Any advice (other than take the collation out of the table definition and always code carefully)? 2) How does SQLite handle missing collations? Are there any things that are safe to do using tools that do not have the collation? (For instance, is read-only access ok? It seems to be, and using DB Browser for SQLite gives a warning but then handles the table correctly, including ordering by the column with the missing collation. The Command Line Shell refuses to do anything with the table except .dump it.) All suggestions welcome. Gerry Snyder ___ sqlite-users mailing list sqlite-users at mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ Gunter Hick Software Engineer Scientific Games International GmbH FN 157284 a, HG Wien Klitschgasse 2-4, A-1130 Vienna, Austria Tel: +43 1 80100 0 E-Mail: hick at scigames.at This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.
[sqlite] Safe use of custom collations that are not available in all tools
The problem is that I want to make the data available to folks who do not have my application (emergency-only sort of thing--my Tcl-based GUI works well for me, but is probably not ready for prime time). If something happens to me I want the data in the file to be recoverable. Losing the collation is fine, losing the table data is not. Thank you for the suggestion, though. It got me thinking along the lines of making a starpack (Tcl executable plus my s/w in a single file) available, which may be the way to go if there does not turn out to be a safe way of handling missing collations. Gerry On 3/17/2015 11:15 AM, Hick Gunter wrote: > How about coding the collation in C and statically linking it into the SQLite > library you provide with your application? > > -Urspr?ngliche Nachricht- > Von: Gerry Snyder [mailto:mesmerizerfan at gmail.com] > Gesendet: Dienstag, 17. M?rz 2015 18:02 > An: 'General Discussion of SQLite Database' > Betreff: [sqlite] Safe use of custom collations that are not available in all > tools > > In one of my tables I need a collation that is an extension of NOCASE (it > ignores spaces and punctuation, translates a very limited set of accented > characters into their unaccented forms). I wrote it in Tcl, and it works well > in my tools. > > At first I used the collation only in SELECT statements, but more than once I > failed to specify it and did not get the desired ordering (of course). So, I > put the collation in the column definition in the table definition. This > works perfectly in my s/w, but other tools complain about a missing collation. > > So, two questions: > > 1) Any advice (other than take the collation out of the table definition and > always code carefully)? > > 2) How does SQLite handle missing collations? Are there any things that are > safe to do using tools that do not have the collation? (For instance, is > read-only access ok? It seems to be, and using DB Browser for SQLite gives a > warning but then handles the table correctly, including ordering by the > column with the missing collation. The Command Line Shell refuses to do > anything with the table except .dump it.) > > All suggestions welcome. > > Gerry Snyder > ___ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > > ___ > Gunter Hick > Software Engineer > Scientific Games International GmbH > FN 157284 a, HG Wien > Klitschgasse 2-4, A-1130 Vienna, Austria > Tel: +43 1 80100 0 > E-Mail: hick at scigames.at > > This communication (including any attachments) is intended for the use of the > intended recipient(s) only and may contain information that is confidential, > privileged or legally protected. Any unauthorized use or dissemination of > this communication is strictly prohibited. If you have received this > communication in error, please immediately notify the sender by return e-mail > message and delete all copies of the original communication. Thank you for > your cooperation. > > > ___ > sqlite-users mailing list > sqlite-users at mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Safe use of custom collations that are not available in all tools
In one of my tables I need a collation that is an extension of NOCASE (it ignores spaces and punctuation, translates a very limited set of accented characters into their unaccented forms). I wrote it in Tcl, and it works well in my tools. At first I used the collation only in SELECT statements, but more than once I failed to specify it and did not get the desired ordering (of course). So, I put the collation in the column definition in the table definition. This works perfectly in my s/w, but other tools complain about a missing collation. So, two questions: 1) Any advice (other than take the collation out of the table definition and always code carefully)? 2) How does SQLite handle missing collations? Are there any things that are safe to do using tools that do not have the collation? (For instance, is read-only access ok? It seems to be, and using DB Browser for SQLite gives a warning but then handles the table correctly, including ordering by the column with the missing collation. The Command Line Shell refuses to do anything with the table except .dump it.) All suggestions welcome. Gerry Snyder