graphene-sqlalchemy-filter icon indicating copy to clipboard operation
graphene-sqlalchemy-filter copied to clipboard

Support for VARBINARY Fields for Unicode

Open palisadoes opened this issue 4 years ago • 1 comments

How should I configure graphene-sqlalchemy-filter to account for VARBINARY fields in a SQLAlchemy model?

I have no issues using graphene-sqlalchemy-filter filtering on INTEGER columns. With VARBINARY defined columns, I can filter using numeric only strings with these caveats.

  1. Filtering with a "0" gives every value.
  2. Filtering with an "AlphaNumeric" value or a a numeric value with a leading zero gives this error. The character referenced is the location of the first non-numeric character in the string. In this case the filter string was "75556b"
{
  "errors": [
    {
      "message": "Extra data: line 1 column 6 (char 5)"
    }
  ]
}

You can view my code here where I'm attempting to filter the PairXlate table on key (VARBINARY) and idx_pair_xlate_group (BIGINT). : https://github.com/palisadoes/pattoo/tree/753885eb4dfa72c525425a29c98e5fd6ef6fb8ff/pattoo/db

palisadoes avatar Dec 16 '19 06:12 palisadoes

What type of data is stored in VARBINARY? Can you give some examples of sqlalchemy queries you are interested in?

art1415926535 avatar Dec 23 '19 13:12 art1415926535