> For the complete documentation index, see [llms.txt](https://goooqo.docs.doyto.win/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://goooqo.docs.doyto.win/query-mapping/query-object/custom-condition-field.md).

# Custom Condition Field

## Mapping

For types of query conditions that are not currently supported, GoooQo uses the tag `condition` to directly write native SQL conditions:&#x20;

### Example

```go
type UserQuery struct {
    PageQuery
    Account *string `condition:"(username = ? OR email = ?)"`
    //...
}
```

Output SQL:&#x20;

```go
userQuery := UserQuery{Account: P("John")}
users, err := userDataAccess.Query(ctx, userQuery)
// SQL="SELECT id, name, score, memo, deleted FROM t_user
// WHERE (username = ? OR email = ?)" args="[John John]"
```
