-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@cap-js/sqlite: search with multiple words leads to error #127
Comments
Can you add an example? |
Thanks. We intentionally decided to provide only limited support for |
actually, the error also occurs on postgres, i.e., the error message wrongly status "SQLite". i think we should revisit, at least for postgres. issue occurs as soon as user input contains a whitespace as this is an implicit i added a change to my pr that would support it. not sure it's the right way, though. i'm not really familiar with this coding. ;) |
Hi @ArtyomAD, I would think that it would be better if you check if this issue also occurs when you use sqlite as then you could contribute the SQL statement that is created when you issue the query. Or you create a new issue which mentions the postgres driver. |
Hello @gregorwolf. We face identical error in both cases with sqlite and postgres. SQLite: Postgres in BTP: |
I can confirm that the issue also occurs with SQLite. The search input from Fiori Elements is passed directly to the search query - if the user enters a search string with whitespaces, search produces an error. |
This issue also breaks Fiori Elements apps, when users try to enter text with whitespaces in value help fields. |
…ds (#472) This patch improves the error handling for #127 by showing a slightly better understandable error message to the user. Before: <img width="622" alt="image" src="https://github.com/cap-js/cds-dbs/assets/12449/370b718c-0efe-4c45-b0bb-afa7ad1549a0"> After: <img width="620" alt="image" src="https://github.com/cap-js/cds-dbs/assets/12449/032c340a-758d-43eb-825e-2b3b5afc22b8"> Seems like CAP expects an Error instance these days, because it accesses error.message. `Parameter 'error.message' must be type of 'string'` # CDS setup @sap/cds: 7.3.1 @sap/cds-compiler: 4.3.2 @sap/cds-dk (global): 7.3.2 @sap/cds-fiori: 1.1.0 @sap/cds-foss: 4.0.2 @sap/cds-mtxs: 1.12.1 @sap/eslint-plugin-cds: 2.6.3 Node.js: v18.19.1 cds-dbs: 1.3.1
SQLite only supports single value arguments for $search
.OR
The text was updated successfully, but these errors were encountered: