Skip to content

Commit

Permalink
Expression Library priority changed.
Browse files Browse the repository at this point in the history
Changed to give priority to SpEL
  • Loading branch information
HidekiSugimoto189 committed Sep 25, 2024
1 parent 35315ff commit f0ac3a2
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 40 deletions.
44 changes: 25 additions & 19 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ uroboroSQLは主にSQL中心の設計コンセプトを採用しています。J
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ognl</groupId>
<artifactId>ognl</artifactId>
<version>3.1.23</version>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>5.3.20</version>
</dependency>
```

Expand All @@ -41,24 +41,24 @@ uroboroSQLは主にSQL中心の設計コンセプトを採用しています。J
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>5.3.20</version>
<groupId>ognl</groupId>
<artifactId>ognl</artifactId>
<version>3.1.23</version>
</dependency>
```

### for Gradle

```gradle
compile group: 'jp.co.future', name: 'uroborosql', version: '1.0.0-SNAPSHOT'
compile group: 'ognl', name: 'ognl', version: '3.1.23'
compile group: 'org.springframework', name: 'spring-expression', version: '5.3.20'
```

または

```gradle
compile group: 'jp.co.future', name: 'uroborosql', version: '1.0.0-SNAPSHOT'
compile group: 'org.springframework', name: 'spring-expression', version: '5.3.20'
compile group: 'ognl', name: 'ognl', version: '3.1.23'
```

## Documentation
Expand All @@ -67,7 +67,7 @@ compile group: 'org.springframework', name: 'spring-expression', version: '5.3.2

## Requirement

- Java 1.8 or later.
- Java 11 or later.

## Quick start

Expand Down Expand Up @@ -109,29 +109,33 @@ INTO
```

```java
SqlConfig config = UroboroSQL.builder("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "sa", "").build();
SqlConfig config = UroboroSQL.builder("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "sa", "")
.build();

try (SqlAgent agent = config.agent()) {
// SELECT
List<Map<String, Object>> departments = agent.query("department/select_department").param("dept_no", 1001).collect();
List<Map<String, Object>> departments = agent.query("department/select_department")
.param("dept_no", 1001)
.collect();

// INSERT
int count = agent.update("department/insert_department")
.param("dept_no", 1001)
.param("dept_name", "sales")
.count();
.param("dept_no", 1001)
.param("dept_name", "sales")
.count();
}
```

### DAO Interface

```java
SqlConfig config = UroboroSQL.builder("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "sa", "").build();
SqlConfig config = UroboroSQL.builder("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "sa", "")
.build();

try (SqlAgent agent = config.agent()) {
// select
Department dept =
agent.find(Department.class, 1001).orElse(null);
Department dept = agent.find(Department.class, 1001)
.orElse(null);

// insert
Department hrDept = new Department();
Expand Down Expand Up @@ -168,12 +172,14 @@ try (SqlAgent agent = config.agent()) {

- CLI
- <https://github.com/future-architect/uroboroSQL-formatter>
- VSCode Plugin
- <https://github.com/future-architect/vscode-uroborosql-fmt>
- Eclipse Plugin
- <https://github.com/future-architect/eclipse-uroborosql-formatter>
- Sublime Text 3 Plugin
- <https://github.com/future-architect/Sublime-uroboroSQL-formatter>
- IntelliJ IDEA Platform Plugin
- <https://github.com/future-architect/idea-uroborosql-formatter>
- Eclipse Plugin
- <https://github.com/future-architect/eclipse-uroborosql-formatter>

## License

Expand Down
44 changes: 25 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ for Japanese, see [README.ja.md](https://github.com/future-architect/uroborosql/
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ognl</groupId>
<artifactId>ognl</artifactId>
<version>3.1.23</version>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>5.3.20</version>
</dependency>
```

Expand All @@ -43,24 +43,24 @@ or
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>5.3.20</version>
<groupId>ognl</groupId>
<artifactId>ognl</artifactId>
<version>3.1.23</version>
</dependency>
```

### for Gradle

```gradle
compile group: 'jp.co.future', name: 'uroborosql', version: '1.0.0-SNAPSHOT'
compile group: 'ognl', name: 'ognl', version: '3.1.23'
compile group: 'org.springframework', name: 'spring-expression', version: '5.3.20'
```

or

```gradle
compile group: 'jp.co.future', name: 'uroborosql', version: '1.0.0-SNAPSHOT'
compile group: 'org.springframework', name: 'spring-expression', version: '5.3.20'
compile group: 'ognl', name: 'ognl', version: '3.1.23'
```

## Documentation
Expand All @@ -69,7 +69,7 @@ compile group: 'org.springframework', name: 'spring-expression', version: '5.3.2

## Requirement

- Java 1.8 or later.
- Java 11 or later.

## Quick start

Expand Down Expand Up @@ -111,29 +111,33 @@ INTO
```

```java
SqlConfig config = UroboroSQL.builder("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "sa", "").build();
SqlConfig config = UroboroSQL.builder("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "sa", "")
.build();

try (SqlAgent agent = config.agent()) {
// SELECT
List<Map<String, Object>> departments = agent.query("department/select_department").param("dept_no", 1001).collect();
List<Map<String, Object>> departments = agent.query("department/select_department")
.param("dept_no", 1001)
.collect();

// INSERT
int count = agent.update("department/insert_department")
.param("dept_no", 1001)
.param("dept_name", "sales")
.count();
.param("dept_no", 1001)
.param("dept_name", "sales")
.count();
}
```

### DAO Interface

```java
SqlConfig config = UroboroSQL.builder("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "sa", "").build();
SqlConfig config = UroboroSQL.builder("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1", "sa", "")
.build();

try (SqlAgent agent = config.agent()) {
// select
Department dept =
agent.find(Department.class, 1001).orElse(null);
Department dept = agent.find(Department.class, 1001)
.orElse(null);

// insert
Department hrDept = new Department();
Expand Down Expand Up @@ -170,12 +174,14 @@ We also prepare a SQL formatter useful for development.

- CLI
- <https://github.com/future-architect/uroboroSQL-formatter>
- VSCode Plugin
- <https://github.com/future-architect/vscode-uroborosql-fmt>
- Eclipse Plugin
- <https://github.com/future-architect/eclipse-uroborosql-formatter>
- Sublime Text 3 Plugin
- <https://github.com/future-architect/Sublime-uroboroSQL-formatter>
- IntelliJ IDEA Platform Plugin
- <https://github.com/future-architect/idea-uroborosql-formatter>
- Eclipse Plugin
- <https://github.com/future-architect/eclipse-uroborosql-formatter>

## License

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
jp.co.future.uroborosql.expr.ognl.OgnlExpressionParserFactory
jp.co.future.uroborosql.expr.spel.SpelExpressionParserFactory
jp.co.future.uroborosql.expr.spel.SpelExpressionParserFactory
jp.co.future.uroborosql.expr.ognl.OgnlExpressionParserFactory

0 comments on commit f0ac3a2

Please sign in to comment.