Plugin Developer Discussion

Discussion for FogBugz Plugin developers

SQL Binary Op Support for 'LIKE'


I'm working on constructing a vaguely complex query on one of the built in queries (CBugEventQuery, specifically) and am running into a problem using the SQL LIKE operator.

When I add any clauses whose operation is LIKE to the WHERE, I get an exception when executing the query with the error:
"Invalid syntax: expected boolean expression, found 'LIKE'"

It looks like the API is doing some preprocessing on the WHERE string and doesn't recognize LIKE as a valid operation. Is using arbitrary SQL in database queries not supported? Is there documentation which explains what these restrictions are? I can do the filtering outside of the sql query, but it's substantially slower to do so.

Clayton Sims Send private email
Wednesday, October 7, 2009
As a security measure, and because we support three database backends, we parse the SQL and ensure it only uses approved functions and syntax.  The list of allowed functions is here:

Unfortunately we don't support LIKE right now because the syntax differs between backends and we don't have a way to allow plugin developers to use different syntax based on the DB backend.
David Fullerton Send private email
Thursday, October 8, 2009

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz