Skip to content

Conversation

@watsonhaw5566
Copy link

No description provided.

@watsonhaw5566 watsonhaw5566 changed the title feat: 改进 whereJsonContains 方法支持数组对象查询 reafactor: 改进 whereJsonContains 方法支持数组对象查询 Sep 19, 2025
@watsonhaw5566 watsonhaw5566 changed the title reafactor: 改进 whereJsonContains 方法支持数组对象查询 refactor: 改进 whereJsonContains 方法支持数组对象查询 Sep 19, 2025
@watsonhaw5566
Copy link
Author

watsonhaw5566 commented Sep 19, 2025

有空麻烦帮忙看看 ,谢谢 。我在之前的基础上添加了 json 数组对象的支持。

数据对象使用方式是

$user = Db::name('user')
    ->whereJsonContains('info',  [ 'name' => 'thinkphp'])
    ->whereOrJsonContains('info->name', ['name' => 'thinkphp'])
    ->find();

但你们的代码格式化,我还不知道怎么弄,所以有小部分代码的格式化有点乱了。

Sign up for free to 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.

1 participant