Back

SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION appwrite.JSON_OVERLAPS does not exi

  • 0
  • Self Hosted
  • Databases
  • Web
Abhishek
12 Jul, 2024, 20:26

SQLSTATE[42000]: Syntax error or access violation: 1305 FUNCTION appwrite.JSON_OVERLAPS does not exist

{"message":"Server Error","code":500,"type":"general_unknown","version":"1.5.7"}

This happens when querying with contains filter

@swoole/library/core/Database/PDOStatementProxy.php

TypeScript
/usr/src/code/vendor/utopia-php/database/src/Database/Adapter/MariaDB.php in __call at line 1821
/usr/src/code/vendor/utopia-php/database/src/Database/Database.php in find at line 4859
/usr/src/code/vendor/utopia-php/database/src/Database/Validator/Authorization.php in Utopia\Database\{closure} at line 166
/usr/src/code/vendor/utopia-php/database/src/Database/Database.php in skip at line 4870
/usr/src/code/app/controllers/api/databases.php in find at line 3021
/usr/src/code/vendor/utopia-php/framework/src/App.php in {closure} at line 531
/usr/src/code/vendor/utopia-php/framework/src/App.php in execute at line 705
/usr/src/code/app/http.php in run at line 257
{closure}```
TL;DR
Developers are facing a syntax error due to a missing function 'appwrite.JSON_OVERLAPS' when using the `contains` filter in an SQL query with MariaDB. The error is causing a server error with code 500. This issue occurs in the PDOStatementProxy file.
D5
12 Jul, 2024, 20:47

Could you specify how to replicate this?

D5
12 Jul, 2024, 20:48

You're using the query contains filter, but in what attribute or how?

Abhishek
12 Jul, 2024, 20:52

Attribute Type: String [] Code:

TypeScript
        databases.listDocuments(
            "DB",
            "COLL",
            [Query.contains('column', ['A','B']]
        ).then().catch();
Steven
12 Jul, 2024, 20:53

Are you not using mariadb?

Abhishek
12 Jul, 2024, 20:54

Yes

Steven
12 Jul, 2024, 20:55

Yes you aren't?

Abhishek
12 Jul, 2024, 20:55

Sorry, I'm using mariadb

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more