[odb-users] [Search of feature] LIKE in the ODB query language

Boris Kolpackov boris at codesynthesis.com
Thu Feb 21 06:46:36 EST 2013


Hi Florian,

florian grignon <grignon.florian at gmail.com> writes:

> I would be very glad to have your patch when you're done with it.

Ok, I've added the SQL LIKE support for the next release (2.3.0). To
try it with 2.2.0, you will need to do the following:

1. Apply the following patch to libodb-2.2.2:

  http://scm.codesynthesis.com/?p=odb/libodb.git;a=patch;h=4962329eecb716bc2b99810ec1ac4214606fc1e8

2. Apply the following patch to libodb-sqlite-2.2.0 (similar patches for
   all the other database runtimes are available):

  http://scm.codesynthesis.com/?p=odb/libodb-sqlite.git;a=patch;h=b580f1548ff335a0e1fa004fc6626486535c94e1

Once, this is done, you can use the new like() function like this:

query::name.like ("J%");

Or, with the escape character:

query::name.like ("%!_Doe", "!");

Let us know how it works for you.

Boris



More information about the odb-users mailing list