Skip to content

Feat array contains - #335

Merged
abnegate merged 20 commits into
mainfrom
feat-array-contains
Jan 19, 2024
Merged

Feat array contains#335
abnegate merged 20 commits into
mainfrom
feat-array-contains

Conversation

@abnegate

Copy link
Copy Markdown
Member
  • Allow querying array contents using Query::contains

@abnegate
abnegate requested a review from fogelitoOctober 9, 2023 07:47
Comment threadsrc/Database/Adapter/MariaDB.php Outdated

if ($array) {
$type = 'LONGTEXT';
$type = 'JSON';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will have to migrate this on Appwrite

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK
Just saw on MariaDB when trying to create a JSON attribute, It creates this:
genres longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(genres))
While in Mysql it is really a JSON field

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm so we won't need a migration for MariaDB but will for MySQL.. this is a new problem 😅

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can save it as Text + create a key / value Collection for search?

Comment threadsrc/Database/Adapter/MariaDB.php Outdated
Comment threadtests/Database/Base.php

@fanatic75fanatic75 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@abnegate@fogelito@fanatic75