Setting a default collation for a database

Monday, 18 December 2017 · 2 messages · last reply 19 Dec 2017
JR
Jonathan Robie18 Dec 2017 23:26 #
I would like to set a default collation for a database, a collation that will be used for all queries unless the user asks for a different collation. My use case: a database in Greek will never be sensibly sorted using an English collation, and I don't want users to need to specify collations over and over. Is this possible? Jonathan
CG
Christian Grün19 Dec 2017 16:57 #
Hi Jonathan, Currently, there is no way to define a default collation in a database. Some language support is available for the XQuery Full Text feature and the full-text index structure: The options that have been used for creating the full-text index will also be applied to the optimized full-text queries [1]. I’ll have some thoughts if we can do something similar for collations. The prerequisite will be that we can detect at compile time which database will be accessed by a query (as BaseX allows you to access multiple databases in a single XQuery expression). Hope this helps, Christian [1] http://docs.basex.org/wiki/Indexes#Full-Text_Index
Quoted text · Jonathan Robie · 11 lines
On Mon, Dec 18, 2017 at 10:26 PM, Jonathan Robie <jonathan.robie at gmail.com> wrote: > I would like to set a default collation for a database, a collation that > will be used for all queries unless the user asks for a different collation. > My use case: a database in Greek will never be sensibly sorted using an > English collation, and I don't want users to need to specify collations over > and over. > > Is this possible? > > Jonathan

⚡Generated with XQuery