io.vulpine.lib:sql

SQL First query helpers.

Лицензия

Лицензия

Группа

Группа

io.vulpine.lib
Идентификатор

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

simple-sql
Последняя версия

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

0.1.5
Дата

Дата

Тип

Тип

jar
Описание

Описание

io.vulpine.lib:sql
SQL First query helpers.
Ссылка на сайт

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

https://github.com/Vulpine-IO/lib-sql
Организация-разработчик

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

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

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

https://github.com/Vulpine-IO/lib-sql

Скачать simple-sql

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

<!-- https://jarcasting.com/artifacts/io.vulpine.lib/simple-sql/ -->
<dependency>
    <groupId>io.vulpine.lib</groupId>
    <artifactId>simple-sql</artifactId>
    <version>0.1.5</version>
</dependency>
// https://jarcasting.com/artifacts/io.vulpine.lib/simple-sql/
implementation 'io.vulpine.lib:simple-sql:0.1.5'
// https://jarcasting.com/artifacts/io.vulpine.lib/simple-sql/
implementation ("io.vulpine.lib:simple-sql:0.1.5")
'io.vulpine.lib:simple-sql:jar:0.1.5'
<dependency org="io.vulpine.lib" name="simple-sql" rev="0.1.5">
  <artifact name="simple-sql" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.vulpine.lib', module='simple-sql', version='0.1.5')
)
libraryDependencies += "io.vulpine.lib" % "simple-sql" % "0.1.5"
[io.vulpine.lib/simple-sql "0.1.5"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

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

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

sql-import

sql import Codacy code quality License Java Version

SQL resource loading & caching.

Reads from a configurable standardized directory layout organized by query type.

Queries are cached per SqlLoader instance so repeated loads of the same query will only incur the filesystem I/O cost once.

Import functions utilize the java.util.Optional type. In the event that a query does not exist or cannot be loaded, an empty Optional will be returned, otherwise the Optional will contain the SQL text loaded from the specified file.

Examples

Resource directory using default settings
/resource-dir (src/main/resources for Gradle projects)
  └─ /sql
      ├─ /delete
      │   ├─ /comments
      │   │   ├─ by-id.sql
      │   │   └─ by-user.sql
      │   └─ /users
      │       └─ by-id.sql
      ├─ /insert
      │   ├─ /comment.sql
      │   └─ /user.sql
      ├─ /select
      (etc...)

Using the example above loading queries could be accomplished by the following:

Example.java
public void example() {
  var loader      = new SqlLoader(); // (1)
  var delComments = loader.delete("comments.by-user"); // (2)
  var delUsers    = loader.delete("users/by-id"); // (3)
  var insUser     = loader.insert("user");
}
  1. Defaulted SqlLoader instance

  2. Import using dot notation

  3. Import using path notation

io.vulpine.lib

Vulpine IO

Small libs, big dreams

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

Версия
0.1.5