Comments (1)
The following extraction conditions are supported.
method | generated sql | comment |
---|---|---|
equal("col", "value") | col = 'value' | |
notEqual("col", "value") | col != 'value' | |
greaterThan("col", 1) | col > 1 | |
lessThan("col", 1) | col < 1 | |
greaterEqual("col", 1) | col >= 1 | |
lessThan("col", 1) | col <= 1 | |
in("col", "val1", "val2") | col in ('val1', 'val2') | |
in("col", List.of("val1", "val2")) | col in ('val1', 'val2') | |
notIn("col", "val1", "val2") | col not in ('val1', 'val2') | |
notIn("col", List.of("val1", "val2")) | col not in ('val1', 'val2') | |
like("col", "%val%") | like '%val%' | "%val%" does not escape |
startsWith("col", "val") | like 'val%' | "val" does escape |
endsWith("col", "val") | like '%val' | "val" does escape |
contains("col", "val") | like '%val%' | "val" does escape |
notLike("col", "%val%") | not like '%val%' | "%val%" does not escape |
notStartsWith("col", "val") | not like 'val%' | "val" does escape |
notEndsWith("col", "val") | not like '%val' | "val" does escape |
notContains("col", "val") | not like '%val%' | "val" does escape |
between("col", 1, 2) | col between 1 and 2 | |
isNull("col") | col is null | |
isNotNull("col") | col is not null | |
where("col = 1 or col = 2") | (col = 1 or col = 2) | If specified with more than one or other extraction conditions, it is combined with an AND operator |
asc("col1", "col2") | order by col1 asc, col2 asc | Specify NULLS LAST if NULLS is available |
asc("col1", Nulls.FIRST) | order by col1 asc NULLS FIRST | When specified more than once, they are arranged in call order |
desc("col1", "col2") | order by col1 desc, col2 desc | Specify NULLS LAST if NULLS is available |
desc("col1", Nulls.FIRST) | order by col1 desc NULLS FIRST | When specified more than once, they are arranged in call order |
limit(10) | LIMIT 10 | Throw UroborosqlRuntimeException if the limit database can not be used. The sentence to be output is switched depending on the dialect of the database. |
offset(10) | OFFSET 10 | Throw UroborosqlRuntimeException if the offset database can not be used. The sentence to be output is switched depending on the dialect of the database. |
from uroborosql.
Related Issues (20)
- API change of AbstractExtractionCondition#where()
- I want to get timestamp with time zone (timestamptz) as ZonedDateTime with JDBCDriver of postgresql
- agent.insert() throws Exception in Oracle HOT 1
- When updating using SqlEntityQuery, the snake case cannot be used when specifying a column in the Set clause.
- ForUpdate is not enabled if SqlEntityQuery#notExists() and SqlEntityQuery#forUpdate() are used together.
- I want to select the optimistic locking method
- When table column name is camel case, it is not mapped to Entity class field.
- I want an API to truncate a table.
- I want a Consumer to be called when the transaction ends
- I want to insert the identifier of the DAO interface in the SQL execution time log.
- I want an API to get a scalar value
- If the SQL contains a column name ending with _set, execution will fail
- SQLException occurs in Entity Query/Insert/Update of the table in which the line comment is included in the column comment.
- Difference in operation between OGNL and SpEL occurs
- AutoIncrement by @Id does not correspond to UUID type of postgresql
- If you specify Optional.empty() in the field of Entity and perform update, null is not set in the target column.
- NioSqlManager can't read sql file in Spring-boot fat jar
- I want to easily execute only specific SQL with autoCommit=true.
- I want you to be able to do between in two columns HOT 1
- What is the best way to "SELECT COUNT(*)" with "SqlAgent#query" ? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uroborosql.