Skip to content

[proposal] Support _add #153

@int8259

Description

@int8259

There're many cases that user want to use aop to filter data, like soft delete. By adding support for '_add', it enables users to implement AOP queries more easily.

just like:

bllWhere := map[string]interface{}{
	"country":      "China",
	"role":         "driver",
	"age >":        45,
	"gmt_create <": builder.Raw("gmt_modified"),
	"_or": []map[string]interface{}{
		{
			"x1":    11,
			"x2 >=": 45,
		},
		{
			"x3":    "234",
			"x4 <>": "tx2",
		},
	},
}

aopWhere := map[string]interface{}{
	"_and": []map[string]interface{}{
	{
	      "is_del": 0,
        },        
	     bllWhere,
        },
}

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