You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some operators missing from :sxql.operator, so I was trying to use sxql.operator::define-op to add the @@ operator for search in postgres, so I wrote:
Then I was unable to use it in a where clause, it always used the default function application syntax (e.g. @@(field-name plainto_tsquery(?))).
It turns out that this is because, when define-op interns symbols, it doesn't specify a package to intern into, and so it was defining aa-op in :cl-user, then the op wasn't found and used by the query generator.
I know this isn't in the public interface, but it is useful to be able to define operators. I don't know enough about other dialects of sql to know if @@ is supported widely enough to submit a PR to add it to sxql, but maybe just making define-op intern the symbols in :sxql.operator so they are actually usable would be a nice solution.
The text was updated successfully, but these errors were encountered:
There are some operators missing from
:sxql.operator
, so I was trying to usesxql.operator::define-op
to add the@@
operator for search in postgres, so I wrote:Then I was unable to use it in a where clause, it always used the default function application syntax (e.g.
@@(field-name plainto_tsquery(?))
).It turns out that this is because, when
define-op
interns symbols, it doesn't specify a package to intern into, and so it was definingaa-op
in:cl-user
, then the op wasn't found and used by the query generator.I know this isn't in the public interface, but it is useful to be able to define operators. I don't know enough about other dialects of sql to know if
@@
is supported widely enough to submit a PR to add it to sxql, but maybe just makingdefine-op
intern the symbols in:sxql.operator
so they are actually usable would be a nice solution.The text was updated successfully, but these errors were encountered: