#541 Allow registration of user defined collations in ooSQLite

ooSQLite.1.0.0
pending
ooSQLite (9)
doc
1
2013-05-19
2013-04-26
No

It would be nice if there was an ooSQLite method/function that allows additional SQLite functions to be registered to SQLite. I wish to implement an alternative COLLATE function but currently the only way to do this is to write the function in C and modify ooSQLite to make a call to sqlite3_create_collation_v2 to register a callback routine. The (for me) ideal solution would be a general purpose method that takes for example "COLLATE" in this case as the first parameter followed by any number of additional parameters to satisfy the requirements of the corresponding sqlite3 API. (I'm aware that this has been discussed in the past and that I've expressed concerns about the performance impact of this particular function, but by having a general purpose registration interface one have the option to test such functions and implement only when working to satisfaction.) Thanks.

Related

Feature Requests: #541

Discussion

  • Mark Miesfeld
    Mark Miesfeld
    2013-04-26

    • status: unread --> open
     
  • Mark Miesfeld
    Mark Miesfeld
    2013-04-28

    • summary: Registration of additional functions in ooSQLite --> Allow registration of user defined collations in ooSQLite
     
  • Mark Miesfeld
    Mark Miesfeld
    2013-04-28

    • status: open --> accepted
    • assigned_to: Mark Miesfeld
    • Pending work items: none --> code+doc+test
     
  • Mark Miesfeld
    Mark Miesfeld
    2013-04-28

    Committed revision 9174. [r9174] adds base implementation.

    This commit adds the createCollation method to the ooSQLiteConnection class.

    A short example program:

    testing\collationTest.rex

    is added to show a basic, working example.

    Staffan, I'll start a thread on the User list tomorrow to discuss this further.

    --
    Mark Miesfeld

     

    Related

    Commit: [r9174]

  • Mark Miesfeld
    Mark Miesfeld
    2013-04-28

    Committed revision 9175.

     
  • Staffan Tylen
    Staffan Tylen
    2013-04-30

    Thanks Mark, I've tested this and it seems to work fine, what else to
    expect? :)

    I've compared this way of sorting to the sort callback functions available
    for list and tree views and as expected the overhead seems to be more or
    less the same. Using test data with around 11,000 rows both methods of
    sorting increase the response times about 25 times, so it's a fairly costly
    operation. This I believe is caused by the constant transfer of operation
    between the rexx and non-rexx environments, in which case I guess not much
    can be done to improve it.

    Many thanks again.
    Staffan

    On Sun, Apr 28, 2013 at 7:47 AM, Mark Miesfeld miesfeld@users.sf.netwrote:

    Committed revision 9174. [r9174]http://sourceforge.net/p/oorexx/code-0/9174/adds base implementation.

    This commit adds the createCollation method to the ooSQLiteConnection
    class.

    A short example program:

    testing\collationTest.rex

    is added to show a basic, working example.

    Staffan, I'll start a thread on the User list tomorrow to discuss this
    further.

    --
    Mark Miesfeld


    Status: accepted

    Created: Fri Apr 26, 2013 09:51 AM UTC by Staffan Tylen
    Last Updated: Sun Apr 28, 2013 05:40 AM UTC
    Owner: Mark Miesfeld

    It would be nice if there was an ooSQLite method/function that allows
    additional SQLite functions to be registered to SQLite. I wish to implement
    an alternative COLLATE function but currently the only way to do this is to
    write the function in C and modify ooSQLite to make a call to
    sqlite3_create_collation_v2 to register a callback routine. The (for me)
    ideal solution would be a general purpose method that takes for example
    "COLLATE" in this case as the first parameter followed by any number of
    additional parameters to satisfy the requirements of the corresponding
    sqlite3 API. (I'm aware that this has been discussed in the past and that
    I've expressed concerns about the performance impact of this particular
    function, but by having a general purpose registration interface one have
    the option to test such functions and implement only when working to
    satisfaction.) Thanks.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/oorexx/feature-requests/541/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Commit: [r9174]
    Feature Requests: #541

  • Mark Miesfeld
    Mark Miesfeld
    2013-05-19

    • labels: --> ooSQLite
    • status: accepted --> pending
    • Pending work items: code+doc+test --> doc
     


Anonymous


Cancel   Add attachments