MySQL to H2 Converter

A library to convert MySQL statements to H2-compatible statements

Лицензия

Лицензия

Категории

Категории

MySQL Данные Базы данных H2
Группа

Группа

com.parmet.mysql2h2-converter
Идентификатор

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

mysql2h2-parent
Последняя версия

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

0.2.0
Дата

Дата

Тип

Тип

pom
Описание

Описание

MySQL to H2 Converter
A library to convert MySQL statements to H2-compatible statements
Ссылка на сайт

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

https://github.com/andrewparmet/mysql2h2-converter
Система контроля версий

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

https://github.com/andrewparmet/mysql2h2-converter.git

Скачать mysql2h2-parent

Имя Файла Размер
mysql2h2-parent-0.2.0.pom 3 KB
Обзор

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

<!-- https://jarcasting.com/artifacts/com.parmet.mysql2h2-converter/mysql2h2-parent/ -->
<dependency>
    <groupId>com.parmet.mysql2h2-converter</groupId>
    <artifactId>mysql2h2-parent</artifactId>
    <version>0.2.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.parmet.mysql2h2-converter/mysql2h2-parent/
implementation 'com.parmet.mysql2h2-converter:mysql2h2-parent:0.2.0'
// https://jarcasting.com/artifacts/com.parmet.mysql2h2-converter/mysql2h2-parent/
implementation ("com.parmet.mysql2h2-converter:mysql2h2-parent:0.2.0")
'com.parmet.mysql2h2-converter:mysql2h2-parent:pom:0.2.0'
<dependency org="com.parmet.mysql2h2-converter" name="mysql2h2-parent" rev="0.2.0">
  <artifact name="mysql2h2-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.parmet.mysql2h2-converter', module='mysql2h2-parent', version='0.2.0')
)
libraryDependencies += "com.parmet.mysql2h2-converter" % "mysql2h2-parent" % "0.2.0"
[com.parmet.mysql2h2-converter/mysql2h2-parent "0.2.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.apache.logging.log4j : log4j-core jar 2.8.2

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.8.1

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

  • parser
  • converter

mysql2h2-converter

A MySQL to H2 SQL conversion library written in Java.

Parse a MySQL dump and convert it to H2 statements either as an embedded library or as a standalone tool.

Next steps can include:

Other ideas:

Usage

As a library:

private static void convertAndCreate(Statement stmt, String sqlDump) throws SQLException, ParseException {
    Iterator<SqlStatement> sourceIterator = SQLParserManager.parseScript(new StringReader(sqlDump));
    Iterator<SqlStatement> converted = H2Converter.convertScript(sourceIterator);
    while (converted.hasNext()) {
        stmt.execute(converted.next().toString());
    }
}

On the command line:

java -jar lib/mysql2h2.jar demos/disconf-mysql.sql

Building

mvn install will generate the SQL parser and build an executable JAR.

License

This code is provided under the MIT license.

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

Версия
0.2.0