Mirage

Mirage-SQL is an easy and powerful SQL centric database access library for Java (or JVM based languages) which provides dynamic SQL templates in plain SQL files.

Лицензия

Лицензия

Группа

Группа

jp.sf.amateras
Идентификатор

Идентификатор

mirage
Последняя версия

Последняя версия

1.2.5
Дата

Дата

Тип

Тип

jar
Описание

Описание

Mirage
Mirage-SQL is an easy and powerful SQL centric database access library for Java (or JVM based languages) which provides dynamic SQL templates in plain SQL files.
Ссылка на сайт

Ссылка на сайт

https://github.com/takezoe/mirage
Организация-разработчик

Организация-разработчик

Project Amateras
Система контроля версий

Система контроля версий

https://github.com/takezoe/mirage

Скачать mirage

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/jp.sf.amateras/mirage/ -->
<dependency>
    <groupId>jp.sf.amateras</groupId>
    <artifactId>mirage</artifactId>
    <version>1.2.5</version>
</dependency>
// https://jarcasting.com/artifacts/jp.sf.amateras/mirage/
implementation 'jp.sf.amateras:mirage:1.2.5'
// https://jarcasting.com/artifacts/jp.sf.amateras/mirage/
implementation ("jp.sf.amateras:mirage:1.2.5")
'jp.sf.amateras:mirage:jar:1.2.5'
<dependency org="jp.sf.amateras" name="mirage" rev="1.2.5">
  <artifact name="mirage" type="jar" />
</dependency>
@Grapes(
@Grab(group='jp.sf.amateras', module='mirage', version='1.2.5')
)
libraryDependencies += "jp.sf.amateras" % "mirage" % "1.2.5"
[jp.sf.amateras/mirage "1.2.5"]

Зависимости

compile (7)

Идентификатор библиотеки Тип Версия
commons-dbcp : commons-dbcp jar 1.4
org.javassist : javassist jar 3.21.0-GA
ognl : ognl jar 3.1.12
org.springframework : spring-core Необязательный jar 3.2.5.RELEASE
org.springframework : spring-context Необязательный jar 3.2.5.RELEASE
org.springframework : spring-jdbc Необязательный jar 3.2.5.RELEASE
com.google.inject : guice Необязательный jar 4.0

provided (4)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.apache.ant : ant jar 1.9.6
org.apache.geronimo.specs : geronimo-jta_1.1_spec jar 1.1.1
javax.servlet : servlet-api jar 2.5

test (5)

Идентификатор библиотеки Тип Версия
org.mockito : mockito-core jar 2.7.5
com.h2database : h2 jar 1.4.193
org.hsqldb : hsqldb jar 2.3.4
org.springframework : spring-aop jar 3.2.5.RELEASE
cglib : cglib jar 3.2.0

Модули Проекта

Данный проект не имеет модулей.

Mirage-SQL Build Status Maven Central Join the chat at https://gitter.im/mirage-sql/mirage-sql

Mirage-SQL is an easy and powerful SQL-centric database access library for Java (or JVM based languages) which provides dynamic SQL templates in plain SQL files.

Using

You can get Mirage-SQL from the Maven Central repository. Add the following fragment into your pom.xml.

<dependency>
    <groupId>com.miragesql</groupId>
    <artifactId>miragesql</artifactId>
    <version>2.1.0</version>
</dependency>

or in a Gradle based project add to your build.gradle the following line:

compile 'com.miragesql:miragesql:2.1.0'

or just download it from the Release Page.

Other Mirage-SQL Modules:

Module Description Gradle Build
Mirage-SQL Test The testing functionality. testCompile 'com.miragesql:miragesql-test:2.1.0' Build Status
Mirage-SQL Tools The development tools. testCompile 'com.miragesql:miragesql-tools:2.1.0' Build Status
Mirage-SQL Integration The integration with Spring, Guice and Seasar2. compile 'com.miragesql:miragesql-integration:2.1.0' Build Status

If you are updating your application from a previous Mirage-SQL version, see the Migration Guide.

Example

This is a simple example of a SQL template:

SELECT * FROM BOOK
/*BEGIN*/
  WHERE
  /*IF author != null */
        AUTHOR = /*author*/'Naoki Takezoe'
  /*END*/
  /*IF minPrice != null */
    AND PRICE >= /*minPrice*/20
  /*END*/
  /*IF maxPrice != null */
    AND PRICE <= /*maxPrice*/100
  /*END*/
/*END*/
ORDER BY BOOK_ID ASC

With Mirage-SQL you can embed variables or conditions using special SQL comments, so it's a plain SQL that can be run with any SQL client tool directly. This feature used in the Mirage's SQL template it's called 2Way SQL.

Links:

Dependencies:

Module Dependencies

Версии библиотеки

Версия
1.2.5
1.2.4
1.2.3
1.2.2
1.2.1