Title: PG LIKE search within isArray columns · Issue #368 · devforth/adminforth · GitHub
Open Graph Title: PG LIKE search within isArray columns · Issue #368 · devforth/adminforth
X Title: PG LIKE search within isArray columns · Issue #368 · devforth/adminforth
Description: Hey there! I have one issue that i have solved but seems like I didn't get to the cause of it. So when I'm using isArray for field and substringSearch: true it sets additional " into value See 063 in the query. 🪲📜 PG Q: SELECT "id", "pla...
Open Graph Description: Hey there! I have one issue that i have solved but seems like I didn't get to the cause of it. So when I'm using isArray for field and substringSearch: true it sets additional " into value See 063 ...
X Description: Hey there! I have one issue that i have solved but seems like I didn't get to the cause of it. So when I'm using isArray for field and substringSearch: true it sets additional " into v...
Opengraph URL: https://github.com/devforth/adminforth/issues/368
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PG LIKE search within isArray columns","articleBody":"Hey there!\n\nI have one issue that i have solved but seems like I didn't get to the cause of it.\nSo when I'm using `isArray` for field and `substringSearch: true` it sets additional `\"` into value\nSee `063` in the query.\n\n```\n🪲📜 PG Q: SELECT \"id\", \"plate\", \"name\", \"phones\", \"status\", \"type\", \"building\", \"flat\", \"created_at\", \"updated_at\", \"expire_at\", \"comments\", \"is_us_plate\" FROM \"vehicle\" WHERE \"phones\" ILIKE $1 AND \"status\" IS DISTINCT FROM $2 AND \"building\" = $3 ORDER BY \"id\" DESC LIMIT $4 OFFSET $5 params: [ '%\"063\"%', 2, 'b4', 50, 0 ]\n\n🪲📜 PG Q: SELECT COUNT(*) FROM \"vehicle\" WHERE \"phones\" ILIKE $1 AND \"status\" IS DISTINCT FROM $2 AND \"building\" = $3 values: [ '%\"\\\\\"063\\\\\"\"%', 2, 'b4' ]\n```\nso seems like those quotes are ambigious for `like` query.\nI found only one way is to replace it. In file postgres data connector. But i think that might have a better way to solve it.\n```js\nif (filter.operator == AdminForthFilterOperators.LIKE || filter.operator == AdminForthFilterOperators.ILIKE) {\n let value = filter.value.replaceAll('\"','');\n value = value.replaceAll('\\\\','');\n return [`%${value}%`];\n}\n```\n\nHere's my column setup\n```\n{\n name: 'phones',\n type: AdminForthDataTypes.JSON,\n isArray: {\n enabled: true,\n itemType: AdminForthDataTypes.STRING,\n },\n minLength: 12,\n filterOptions: {\n debounceTimeMs: 800,\n substringSearch: true,\n },\n}\n```\n\nPlease let me know if that can be fixed somehow...\nThanks!","author":{"url":"https://github.com/TrilipuT","@type":"Person","name":"TrilipuT"},"datePublished":"2025-09-25T17:37:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/368/adminforth/issues/368"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9d26fe5c-215b-bd0d-56df-17295e99cab4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C92C:E2E6A:DB2AD0:1280937:698F7AFF |
| html-safe-nonce | 62cf68b184a97ee54a83a5da4361cd2bb21bb234066d92506c63f5a93808e92f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTJDOkUyRTZBOkRCMkFEMDoxMjgwOTM3OjY5OEY3QUZGIiwidmlzaXRvcl9pZCI6IjM3MzA4Mzg4MjEyNjI3NzM3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 134b4c078fa8c239e39fc6228c3c6d56ecef9297392cc7b1fcd23de3697abcea |
| hovercard-subject-tag | issue:3454531373 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/devforth/adminforth/368/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b11dab273eac1ac359304d776382e673949383e67243523267046b0782b845b8/devforth/adminforth/issues/368 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b11dab273eac1ac359304d776382e673949383e67243523267046b0782b845b8/devforth/adminforth/issues/368 |
| og:image:alt | Hey there! I have one issue that i have solved but seems like I didn't get to the cause of it. So when I'm using isArray for field and substringSearch: true it sets additional " into value See 063 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TrilipuT |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4763146d672e989a41c6c0bd715790c0c59341d9f855508c8a3196e1e480b8f7 |
| turbo-cache-control | no-preview |
| go-import | github.com/devforth/adminforth git https://github.com/devforth/adminforth.git |
| octolytics-dimension-user_id | 50526923 |
| octolytics-dimension-user_login | devforth |
| octolytics-dimension-repository_id | 803221216 |
| octolytics-dimension-repository_nwo | devforth/adminforth |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 803221216 |
| octolytics-dimension-repository_network_root_nwo | devforth/adminforth |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8b442a4e0d8e68ffb351da689499018fde153e49 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width