Skip to content

Commit 4d8173f

Browse files
Merge pull request #2 from exasol/refactoring/migrate_mysql_vs
#1: Migrate MySQL virtual schema
2 parents 319990b + 6b9521b commit 4d8173f

31 files changed

+2678
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Dependencies Check
2+
3+
on:
4+
schedule:
5+
- cron: "0 2 * * *"
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Set up JDK 11
14+
uses: actions/setup-java@v1
15+
with:
16+
java-version: 11
17+
- name: Cache local Maven repository
18+
uses: actions/cache@v2
19+
with:
20+
path: ~/.m2/repository
21+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
22+
restore-keys: |
23+
${{ runner.os }}-maven-
24+
- name: Checking dependencies for vulnerabilities
25+
run: mvn org.sonatype.ossindex.maven:ossindex-maven-plugin:audit -f pom.xml
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: GitHub Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
upload_url:
7+
description: 'Upload URL'
8+
required: true
9+
asset_name:
10+
description: 'Asset file name'
11+
required: true
12+
asset_path:
13+
description: 'Asset file path'
14+
required: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up JDK 11
22+
uses: actions/setup-java@v1
23+
with:
24+
java-version: 11
25+
- name: Build with Maven
26+
run: mvn -B clean package --file pom.xml
27+
28+
- name: Upload Release Asset
29+
uses: actions/upload-release-asset@v1
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
with:
33+
upload_url: ${{ github.event.inputs.upload_url }}
34+
asset_path: ${{ github.event.inputs.asset_path }}
35+
asset_name: ${{ github.event.inputs.asset_name }}
36+
asset_content_type: application/java-archive

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/target/
2+
pom.xml.versionsBackup
3+
4+
# Eclipse and Maven
5+
.classpath
6+
.project
7+
# .settings : we need Eclipse settings for code formatter and clean-up rules
8+
target
9+
.cache
10+
dependency-reduced-pom.xml
11+
12+
# Intellij
13+
.idea
14+
# Intellij recommends to share iml files, however, better don't share files which might be outdated
15+
*.iml
16+
17+
# Integration tests
18+
src/test/resources/integration/driver/mysql/*.jar
19+
20+
# Others
21+
.DS_Store
22+
*.swp
23+
local
24+
Scripts
25+
.dbeaver*
26+
**/*.log
27+
.directory
28+
venv/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
eclipse.preferences.version=1
2+
encoding//src/main/java=UTF-8
3+
encoding//src/main/resources=UTF-8
4+
encoding//src/test/java=UTF-8
5+
encoding//src/test/resources=UTF-8
6+
encoding/<project>=UTF-8

.settings/org.eclipse.jdt.core.prefs

Lines changed: 459 additions & 0 deletions
Large diffs are not rendered by default.

.settings/org.eclipse.jdt.ui.prefs

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
cleanup.add_default_serial_version_id=true
2+
cleanup.add_generated_serial_version_id=false
3+
cleanup.add_missing_annotations=true
4+
cleanup.add_missing_deprecated_annotations=true
5+
cleanup.add_missing_methods=false
6+
cleanup.add_missing_nls_tags=false
7+
cleanup.add_missing_override_annotations=true
8+
cleanup.add_missing_override_annotations_interface_methods=true
9+
cleanup.add_serial_version_id=false
10+
cleanup.always_use_blocks=true
11+
cleanup.always_use_parentheses_in_expressions=false
12+
cleanup.always_use_this_for_non_static_field_access=true
13+
cleanup.always_use_this_for_non_static_method_access=false
14+
cleanup.convert_functional_interfaces=true
15+
cleanup.convert_to_enhanced_for_loop=true
16+
cleanup.correct_indentation=true
17+
cleanup.format_source_code=true
18+
cleanup.format_source_code_changes_only=false
19+
cleanup.insert_inferred_type_arguments=false
20+
cleanup.make_local_variable_final=true
21+
cleanup.make_parameters_final=true
22+
cleanup.make_private_fields_final=true
23+
cleanup.make_type_abstract_if_missing_method=false
24+
cleanup.make_variable_declarations_final=true
25+
cleanup.never_use_blocks=false
26+
cleanup.never_use_parentheses_in_expressions=true
27+
cleanup.organize_imports=false
28+
cleanup.qualify_static_field_accesses_with_declaring_class=false
29+
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
30+
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
31+
cleanup.qualify_static_member_accesses_with_declaring_class=true
32+
cleanup.qualify_static_method_accesses_with_declaring_class=false
33+
cleanup.remove_private_constructors=true
34+
cleanup.remove_redundant_modifiers=false
35+
cleanup.remove_redundant_semicolons=true
36+
cleanup.remove_redundant_type_arguments=true
37+
cleanup.remove_trailing_whitespaces=true
38+
cleanup.remove_trailing_whitespaces_all=true
39+
cleanup.remove_trailing_whitespaces_ignore_empty=false
40+
cleanup.remove_unnecessary_casts=true
41+
cleanup.remove_unnecessary_nls_tags=true
42+
cleanup.remove_unused_imports=true
43+
cleanup.remove_unused_local_variables=false
44+
cleanup.remove_unused_private_fields=true
45+
cleanup.remove_unused_private_members=true
46+
cleanup.remove_unused_private_methods=true
47+
cleanup.remove_unused_private_types=true
48+
cleanup.sort_members=false
49+
cleanup.sort_members_all=false
50+
cleanup.use_anonymous_class_creation=false
51+
cleanup.use_blocks=true
52+
cleanup.use_blocks_only_for_return_and_throw=false
53+
cleanup.use_lambda=true
54+
cleanup.use_parentheses_in_expressions=true
55+
cleanup.use_this_for_non_static_field_access=true
56+
cleanup.use_this_for_non_static_field_access_only_if_necessary=false
57+
cleanup.use_this_for_non_static_method_access=false
58+
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
59+
cleanup_profile=_Exasol
60+
cleanup_settings_version=2
61+
eclipse.preferences.version=1
62+
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
63+
formatter_profile=_Exasol
64+
formatter_settings_version=16
65+
org.eclipse.jdt.ui.ignorelowercasenames=true
66+
org.eclipse.jdt.ui.importorder=java;javax;org;com;
67+
org.eclipse.jdt.ui.ondemandthreshold=3
68+
org.eclipse.jdt.ui.staticondemandthreshold=3
69+
sp_cleanup.add_default_serial_version_id=true
70+
sp_cleanup.add_generated_serial_version_id=false
71+
sp_cleanup.add_missing_annotations=true
72+
sp_cleanup.add_missing_deprecated_annotations=true
73+
sp_cleanup.add_missing_methods=false
74+
sp_cleanup.add_missing_nls_tags=false
75+
sp_cleanup.add_missing_override_annotations=true
76+
sp_cleanup.add_missing_override_annotations_interface_methods=true
77+
sp_cleanup.add_serial_version_id=false
78+
sp_cleanup.always_use_blocks=true
79+
sp_cleanup.always_use_parentheses_in_expressions=true
80+
sp_cleanup.always_use_this_for_non_static_field_access=true
81+
sp_cleanup.always_use_this_for_non_static_method_access=false
82+
sp_cleanup.convert_functional_interfaces=true
83+
sp_cleanup.convert_to_enhanced_for_loop=true
84+
sp_cleanup.correct_indentation=true
85+
sp_cleanup.format_source_code=true
86+
sp_cleanup.format_source_code_changes_only=false
87+
sp_cleanup.insert_inferred_type_arguments=false
88+
sp_cleanup.make_local_variable_final=true
89+
sp_cleanup.make_parameters_final=true
90+
sp_cleanup.make_private_fields_final=true
91+
sp_cleanup.make_type_abstract_if_missing_method=false
92+
sp_cleanup.make_variable_declarations_final=true
93+
sp_cleanup.never_use_blocks=false
94+
sp_cleanup.never_use_parentheses_in_expressions=false
95+
sp_cleanup.on_save_use_additional_actions=true
96+
sp_cleanup.organize_imports=true
97+
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
98+
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
99+
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
100+
sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
101+
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
102+
sp_cleanup.remove_private_constructors=true
103+
sp_cleanup.remove_redundant_modifiers=false
104+
sp_cleanup.remove_redundant_semicolons=true
105+
sp_cleanup.remove_redundant_type_arguments=true
106+
sp_cleanup.remove_trailing_whitespaces=true
107+
sp_cleanup.remove_trailing_whitespaces_all=true
108+
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
109+
sp_cleanup.remove_unnecessary_casts=true
110+
sp_cleanup.remove_unnecessary_nls_tags=true
111+
sp_cleanup.remove_unused_imports=true
112+
sp_cleanup.remove_unused_local_variables=false
113+
sp_cleanup.remove_unused_private_fields=true
114+
sp_cleanup.remove_unused_private_members=false
115+
sp_cleanup.remove_unused_private_methods=true
116+
sp_cleanup.remove_unused_private_types=true
117+
sp_cleanup.sort_members=false
118+
sp_cleanup.sort_members_all=false
119+
sp_cleanup.use_anonymous_class_creation=false
120+
sp_cleanup.use_blocks=true
121+
sp_cleanup.use_blocks_only_for_return_and_throw=false
122+
sp_cleanup.use_lambda=true
123+
sp_cleanup.use_parentheses_in_expressions=true
124+
sp_cleanup.use_this_for_non_static_field_access=true
125+
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=false
126+
sp_cleanup.use_this_for_non_static_method_access=false
127+
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
activeProfiles=
2+
eclipse.preferences.version=1
3+
resolveWorkspaceProjects=true
4+
version=1

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
language: java
2+
3+
# Setting sudo to false will cause Travis to use Containers.
4+
# To use Docker's privileged mode, we need to enable sudo.
5+
sudo: required
6+
7+
matrix:
8+
include:
9+
- jdk: openjdk11
10+
11+
addons:
12+
sonarcloud:
13+
organization: exasol
14+
15+
install:
16+
- travis_retry mvn dependency:resolve
17+
18+
script:
19+
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent org.jacoco:jacoco-maven-plugin:prepare-agent-integration verify sonar:sonar -Dsonar.login=${SONAR_TOKEN}
20+
21+
cache:
22+
directories:
23+
- "$HOME/.m2"

README.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# MySQL Virtual Schema
2+
3+
[![Build Status](https://api.travis-ci.com/exasol/mysql-virtual-schema.svg?branch=main)](https://travis-ci.com/exasol/mysql-virtual-schema)
4+
[![Maven Central](https://img.shields.io/maven-central/v/com.exasol/mysql-virtual-schema)](https://search.maven.org/artifact/com.exasol/mysql-virtual-schema)
5+
6+
SonarCloud results:
7+
8+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Amysql-virtual-schema&metric=alert_status)](https://sonarcloud.io/dashboard?id=com.exasol%3Amysql-virtual-schema)
9+
10+
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Amysql-virtual-schema&metric=security_rating)](https://sonarcloud.io/dashboard?id=com.exasol%3Amysql-virtual-schema)
11+
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Amysql-virtual-schema&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=com.exasol%3Amysql-virtual-schema)
12+
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Amysql-virtual-schema&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=com.exasol%3Amysql-virtual-schema)
13+
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Amysql-virtual-schema&metric=sqale_index)](https://sonarcloud.io/dashboard?id=com.exasol%3Amysql-virtual-schema)
14+
15+
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Amysql-virtual-schema&metric=code_smells)](https://sonarcloud.io/dashboard?id=com.exasol%3Amysql-virtual-schema)
16+
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Amysql-virtual-schema&metric=coverage)](https://sonarcloud.io/dashboard?id=com.exasol%3Amysql-virtual-schema)
17+
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Amysql-virtual-schema&metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=com.exasol%3Amysql-virtual-schema)
18+
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=com.exasol%3Amysql-virtual-schema&metric=ncloc)](https://sonarcloud.io/dashboard?id=com.exasol%3Amysql-virtual-schema)
19+
20+
# Overview
21+
22+
The **MySQL Virtual Schema** provides an abstraction layer that makes an external [MySQL](https://www.mysql.com/) database accessible from an Exasol database through regular SQL commands. The contents of the external MySQL database are mapped to virtual tables which look like and can be queried as any regular Exasol table.
23+
24+
If you want to set up a Virtual Schema for a different database system, please head over to the [Virtual Schemas Repository][virtual-schemas].
25+
26+
## Features
27+
28+
* Access a MySQL data source in read only mode from an Exasol database, using a Virtual Schema.
29+
30+
## Table of Contents
31+
32+
### Information for Users
33+
34+
* [Virtual Schemas User Guide][virtual-schemas-user-guide]
35+
* [MySQL Dialect User Guide](doc/user_guide/mysql_user_guide.md)
36+
* [Changelog](doc/changes/changelog.md)
37+
38+
Find all the documentation in the [Virtual Schemas project][vs-doc].
39+
40+
## Information for Developers
41+
42+
* [Virtual Schema API Documentation][vs-api]
43+
44+
### Run Time Dependencies
45+
46+
Running the Virtual Schema requires a Java Runtime version 11 or later.
47+
48+
| Dependency | Purpose | License |
49+
|--------------------------------------------------------------------|--------------------------------------------------------|-------------------------------|
50+
| [Exasol Virtual Schema JDBC][virtual-schema-common-jdbc] | Common JDBC functions for Virtual Schemas adapters | MIT License |
51+
| [MySQL JDBC Driver][mysql-jdbc-driver] | JDBC driver for MySQL database | Elastic License |
52+
| [Exasol Error Reporting][exasol-error-reporting] | Creating unified error messages | MIT License |
53+
54+
### Test Dependencies
55+
56+
| Dependency | Purpose | License |
57+
|--------------------------------------------------------------------|--------------------------------------------------------|-------------------------------|
58+
| [Java Hamcrest](http://hamcrest.org/JavaHamcrest/) | Checking for conditions in code via matchers | BSD License |
59+
| [JUnit](https://junit.org/junit5) | Unit testing framework | Eclipse Public License 1.0 |
60+
| [Mockito](http://site.mockito.org/) | Mocking framework | MIT License |
61+
| [Testcontainers](https://www.testcontainers.org/) | Container-based integration tests | MIT License |
62+
| [Exasol Testcontainers][exasol-testcontainers] | Exasol extension for the Testcontainers framework | MIT License |
63+
| [Test Database Builder][test-db-builder] | Fluent database interfaces for testing | MIT License |
64+
| [Exasol Hamcrest Result Set Matcher][exasol-hamcrest] | Hamcrest result set matcher for testing | MIT License |
65+
| [Exasol UDF Debugging][udf-debugging-java] | Debugging UDFs in testing | MIT License |
66+
67+
68+
### Maven Plug-ins
69+
70+
| Plug-in | Purpose | License |
71+
|--------------------------------------------------------------------|--------------------------------------------------------|-------------------------------|
72+
| [Maven Jacoco Plugin][maven-jacoco-plugin] | Code coverage metering | Eclipse Public License 2.0 |
73+
| [Maven Surefire Plugin][maven-surefire-plugin] | Unit testing | Apache License 2.0 |
74+
| [Maven Compiler Plugin][maven-compiler-plugin] | Setting required Java version | Apache License 2.0 |
75+
| [Maven Assembly Plugin][maven-assembly-plugin] | Creating JAR | Apache License 2.0 |
76+
| [Maven Failsafe Plugin][maven-failsafe-plugin] | Integration testing | Apache License 2.0 |
77+
| [Versions Maven Plugin][versions-maven-plugin] | Checking if dependencies updates are available | Apache License 2.0 |
78+
| [Maven Enforcer Plugin][maven-enforcer-plugin] | Controlling environment constants | Apache License 2.0 |
79+
| [Maven Dependency Plugin][maven-dependency-plugin] | Accessing to test dependencies | Apache License 2.0 |
80+
| [Artifact Reference Checker Plugin][artifact-ref-checker-plugin] | Check if artifact is referenced with correct version | MIT License |
81+
| [Project Keeper Maven Plugin][project-keeper-maven-plugin] | Checking project structure | MIT License |
82+
| [Sonatype OSS Index Maven Plugin][sonatype-oss-index-maven-plugin] | Checking dependencies vulnerability | ASL2 |
83+
84+
[virtual-schema-common-jdbc]: https://github.com/exasol/virtual-schema-common-jdbc
85+
[mysql-jdbc-driver]: https://dev.mysql.com/downloads/connector/j/
86+
[exasol-error-reporting]: https://github.com/exasol/error-reporting-java/
87+
88+
[exasol-testcontainers]: https://github.com/exasol/exasol-testcontainers
89+
[test-db-builder]: https://github.com/exasol/test-db-builder/
90+
[exasol-hamcrest]: https://github.com/exasol/hamcrest-resultset-matcher
91+
[udf-debugging-java]: https://github.com/exasol/udf-debugging-java
92+
93+
[maven-jacoco-plugin]: https://www.eclemma.org/jacoco/trunk/doc/maven.html
94+
[maven-surefire-plugin]: https://maven.apache.org/surefire/maven-surefire-plugin/
95+
[maven-compiler-plugin]: https://maven.apache.org/plugins/maven-compiler-plugin/
96+
[maven-assembly-plugin]: https://maven.apache.org/plugins/maven-assembly-plugin/
97+
[maven-failsafe-plugin]: https://maven.apache.org/surefire/maven-failsafe-plugin/
98+
[versions-maven-plugin]: https://www.mojohaus.org/versions-maven-plugin/
99+
[maven-enforcer-plugin]: http://maven.apache.org/enforcer/maven-enforcer-plugin/
100+
[artifact-ref-checker-plugin]: https://github.com/exasol/artifact-reference-checker-maven-plugin
101+
[maven-dependency-plugin]: https://maven.apache.org/plugins/maven-dependency-plugin/
102+
[project-keeper-maven-plugin]: https://github.com/exasol/project-keeper-maven-plugin
103+
[sonatype-oss-index-maven-plugin]: https://sonatype.github.io/ossindex-maven/maven-plugin/
104+
105+
[virtual-schemas-user-guide]: https://docs.exasol.com/database_concepts/virtual_schemas.htm
106+
[virtual-schemas]: https://github.com/exasol/virtual-schemas
107+
[vs-api]: https://github.com/exasol/virtual-schema-common-java/blob/master/doc/development/api/virtual_schema_api.md
108+
[vs-doc]: https://github.com/exasol/virtual-schemas/tree/master/doc

doc/changes/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changes
2+
3+
* [1.0.0](changes_0.1.0.md)

0 commit comments

Comments
 (0)