Skip to content
This repository was archived by the owner on Jul 16, 2021. It is now read-only.
This repository was archived by the owner on Jul 16, 2021. It is now read-only.

[5.4] Query "sets" #293

@alexbowers

Description

@alexbowers

Currently, in the database system we have a concept of array storage as json, however, sometimes this isn't ideal. Sometimes, a simple comma separated array would be fine.

This could be covered by casting to a set. Which will convert arrays to comma separated, and the comma separated to array again.

There are ways to query this for all databases supported by Laravel. Not all are native solutions, like mysql FIND_IN_SET. However, all work.

The workaround / alternative is this:

where name like 'string%' 
or name like '%,string' 
or name like '%,string,%' 
or name like 'string'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions