EBQuery allows you to easily access databases through a REST API.

Overview

EBQuery

Table of Contents

Introduction - Enterprise Backend as a Service

Requirements

Getting started

Using EBQuery

Features

Introduction - Enterprise Backend as a Service

EBQuery allows you to easily access databases through a REST API.

All you have to do is enter your database connection settings and EBQuery will generate REST API endpoints for all your database tables and views. Moreover, you can easily add custom SQL queries for access via REST API calls.

EBQuery provides SQL result sets as JSON, XML, HTML or CSV data.

EBQuery is an Enterprise Backend as a Service along lines of Parse but for your own databases. It's like Heroku Dataclips but for non-cloud, on-premises databases.

EBQuery is a JavaEE application that's securely hosted on your servers. No data ever leaves your company!

Requirements

EBQuery has the following minimum requirements:

  • Java 6
  • a Servlet container or application server (stand-alone option available)
  • a database server (embedded H2 database available)

Getting started

Installation

EBQuery can be built and installed as a standard web application archive (WAR). Any JavaEE 7 or JavaEE 6 servlet container should work.

Configuration

In order to start and run properly two settings need to be configured for EBQuery:

  • the database to store the application data in
  • security preferences

Database

If you're using a dedicated database for EBQuery (as you probably should for production) you first need to run a DDL script that creates the necessary tables. DDL scripts for the following databases are included in src/main/resources/sql in the EBQuery directory:

  • H2
  • MySQL
  • Oracle Database
  • PostgreSQL

Then you need to set the system property DATABASE_URL according to your database connection settings.

How you set this system property depends on your environment. A common way for doing so is using the -D command line option for Java, e.g.:

java -DDATABASE_URL=postgres://username:password@localhost:5432/EBQuery ...

The format for the URL is

PROTOCOL://USERNAME:PASSWORD@HOST:PORT/DATABASE_NAME

A PostgreSQL DATABASE_URL for example would look like this:

DATABASE_URL=postgres://username:password@localhost:5432/EBQuery

The following protocols / RDBMS are available. Please note that only H2, MySQL and PostgreSQL drivers are included with EBQuery. If you want to use one of the other RDBMS you have to add the appropriate JDBC driver to the shared libraries directory of your Servlet container / application server:

  • as400 (IBM DB2 AS400)
  • db2 (IBM DB2)
  • derby (Apache Derby)
  • edbc (Ingres Database)
  • firebirdsql (Firebird)
  • h2 (H2)
  • hsqldb (HSQLDB)
  • mysql (MySQL)
  • oracle (Oracle Database)
  • postgres (PostgreSQL)
  • sapdb (SAP DB)
  • sqlserver (Microsoft SQL Server)
  • sybase (Sybase)

Please note: Only H2, MySQL and PostgreSQL drivers are included with EBQuery. If you want to use one of the other RDBMS you have to add the appropriate JDBC driver to the shared libraries directory of your Servlet container / application server.

Security

In order to set your basic security preferences for EBQuery the environment variable spring.profiles.active has to be set to either 'local' or 'public', i.e.:

spring.profiles.active=local

or

spring.profiles.active=public

'local' will disable HTTP basic authentication whereas 'public' will enable it. The default password is 'pP2XLieKb6'. This password can (and should be) changed in spring-security-public.xml in src/main/webapp in the EBQuery directory. Please restart the server after having changed the password. Please note: If you turn HTTP basic authentication on your API calls will have to send an HTTP basic authentication header with the appropriate username / password, too.

How you set the spring.profiles.active system property depends on your environment. A common way for doing so is using the -D command line option for Java, e.g.:

java -Dspring.profiles.active=local ...

Using EBQuery

Using EBQuery is simple. EBQuery has 2 main views:

Database Connections

Here you can add and edit and your database connections. A valid database connection consists of:

  • name
  • URL
  • username
  • password

The URL has to be a valid JDBC connection URL such as:

jdbc:postgresql://localhost:5432/SomeDatabase

The following JDBC connection protocols / RDBMS are supported:

  • jdbc:as400:// (IBM DB2 AS400)
  • jdbc:db2:// (IBM DB2)
  • jdbc:derby: (Apache Derby)
  • jdbc:ingres:// (Ingres Database)
  • jdbc:firebirdsql:// (Firebird)
  • jdbc:h2: (H2)
  • jdbc:hsqldb:mem: (HSQLDB)
  • jdbc:JTurbo:// (Microsoft SQL Server, JTurbo driver)
  • jdbc:mysql:// (MySQL)
  • jdbc:oracle:thin:@ (Oracle Database)
  • jdbc:postgresql:// (PostgreSQL)
  • jdbc:sapdb:// (SAP DB)
  • jdbc:microsoft:sqlserver (Microsoft SQL Server)
  • jdbc:sybase:Tds: (Sybase)

Please note: Only H2, MySQL and PostgreSQL drivers are included with EBQuery. If you want to use one of the other RDBMS you have to add the appropriate JDBC driver to the shared libraries directory of your Servlet container / application server.

After having entered a valid database connection EBQuery will automatically create _SELECT _ FROM* queries for each table and view in your database. If your database uses foreign keys EBQuery will extend those queries to include links to referenced database entity resources.

Queries

Clicking on the 'Queries' button from the top menu will show all queries. Clicking the respective button for each database connection will show only the queries for that connection.

Clicking on 'Details' for a query will preview the result set for this query as well as reveal a few additional options:

  • Execute
  • Update
  • New
  • Previous versions

Alongside these options EBQuery displays REST API links for this query above and below the result set preview.

Arguments and variable interpolation

EBQuery allows you to use the ? operator for dynamically supplying one or multiple arguments to a query, e.g.:

SELECT * FROM table WHERE field = ?
SELECT * FROM table WHERE field = ? OR another_field = ?

These arguments can then be supplied as additional URL parameters to your API calls.

Navigating entities referenced by foreign keys

If your database tables make use of foreign keys for referencing entities EBQuery will automatically link those to the referencing entity and add a link to the API resource for the referenced entity.

REST API

EBQuery turns each SQL query into an easily accessible REST API endpoint that returns data in a variety of formats.

Parameters and formats

The EBQuery REST API returns data in the following formats:

  • JSON
  • XML
  • HTML
  • CSV

These are a few example URLs:

EBQuery also allows you to add arguments to an API call, which will be used for interpolating variables in the SQL query. The arguments are appended to the URL after the query ID. Multiple arguments are comma-separated. Moreover, you can also limit the size of the result set by adding a size parameter.

Again, these are a few example URLs:

Features

  • Generate REST APIs from SQL queries.
  • Access your data in JSON, XML or CSV formats.
  • Supports all major RDBMS (including IBM DB2, Microsoft SQL Server, MySQL, Oracle Database and PostgreSQL).
  • Entirely hosted on-premises. Your data stays with you all the time!
  • Conveniently edit your SQL queries and preview your data.
  • Version control for SQL queries.
  • Snapshots (i.e. materialized views if supported by RDBMS).
  • Transitive navigation (i.e. navigating entities referenced by foreign keys).
  • Variable interpolation.
  • Limit and filter query results.
You might also like...

Elasticsearch Java Rest Client.

JEST Jest is a Java HTTP Rest client for ElasticSearch. ElasticSearch is an Open Source (Apache 2), Distributed, RESTful, Search Engine built on top o

Jan 1, 2023

Generate API documents to any place: YApi, RAP2, Eolinker, etc. (一键生成API接口文档, 上传到YApi, Rap2, Eolinker等平台的IDEA插件)

Generate API documents to any place: YApi, RAP2, Eolinker, etc. (一键生成API接口文档, 上传到YApi, Rap2, Eolinker等平台的IDEA插件)

Yapi X 👏 👏 👏 本项目已收录到YApi, Rap2官方仓库 一键生成API接口文档, 上传到YApi, Rap2, Eolinker等平台的IDEA插件. 🐮 亮点 零成本、零入侵: 编写标准Javadoc即可,无需依赖swagger注解, 生成API文档准确性高达99%。 开箱即

Dec 26, 2022

Android app for Ribbit, Broker API Reference App

Android app for Ribbit, Broker API Reference App

Ribbit Reference Implementation (Android) The reference implementation for designing the Android user interface of a broker-dealer trading application

Nov 24, 2022

Database with Java Swing UI that stores consumables (food & drink) using RESTful API to send commands via HTTP

Database with Java Swing UI that stores consumables (food & drink) using RESTful API to send commands via HTTP

Database with Java Swing UI that stores consumables (food & drink) using RESTful API to send commands via HTTP.

Mar 8, 2022

OpenMap is an Open Source JavaBeans-based programmer's toolkit. Using OpenMap, you can quickly build applications and applets that access data from legacy databases and applications.

$Source: /cvs/distapps/openmap/README,v $ $RCSfile: README,v $ $Revision: 1.11 $ $Date: 2002/11/06 19:11:02 $ $Author: bmackiew $ OpenMap(tm) What

Nov 12, 2022

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API

Swagger Core NOTE: If you're looking for Swagger Core 1.5.X and OpenAPI 2.0, please refer to 1.5 branch. NOTE: Since version 2.1.7 Swagger Core suppor

Jan 5, 2023

Just-In-Time Access is an AppEngine application that lets you manage just-in-time privileged access to Google Cloud projects.

Just-In-Time Access is an AppEngine application that lets you manage just-in-time privileged access to Google Cloud projects.

Just-In-Time Access Just-In-Time Access is an AppEngine application that lets you manage just-in-time privileged access to Google Cloud projects. Syno

Jan 3, 2023

cglib - Byte Code Generation Library is high level API to generate and transform Java byte code. It is used by AOP, testing, data access frameworks to generate dynamic proxy objects and intercept field access.

cglib Byte Code Generation Library is high level API to generate and transform JAVA byte code. It is used by AOP, testing, data access frameworks to g

Jan 8, 2023

tuya-spring-boot-starter helps you efficiently create cloud development projects regarding the OpenAPI or message subscription capabilities. You can put all the focus on business logic without taking care of server-side programming nor relational databases.

English | 中文版 tuya-spring-boot-starter helps you efficiently create cloud development projects regarding the OpenAPI or message subscription capabilit

Dec 26, 2022

COMMA Config API is an API allowing you to easily create complex and stylish config menu screens for Minecraft Fabric mods

COMMA Config API is an API allowing you to easily create complex and stylish config menu screens for Minecraft Fabric mods. COMMA stands for Configurable Options Menu Modding API

Jan 13, 2022

This open source project allows you to easily integrate Camunda's External Task Clients into Micronaut projects: simply add a dependency in your Micronaut project

micronaut-camunda-external-client This open source project allows you to easily integrate Camunda 's External Task Clients into Micronaut projects. Mi

Dec 18, 2022

An Editor for CSGO:botprofile.db, allows you to create&improve your own bot easily.

botprofileEditor An Editor for CSGO:botprofile.db, allows you to create&improve your own bot easily. 最新信息 项目重构,舍弃了原来复杂的结构 项目打算全力制作web版,使用SpringBoot作为开

Oct 9, 2022

An Android library that allows you to easily create applications with slide-in menus.

An Android library that allows you to easily create applications with slide-in menus. You may use it in your Android apps provided that you cite this project and include the license in your app. Thanks!

Jan 4, 2023

A custom minimap that displays resources all around you while you adventure through Aeternum!

A custom minimap that displays resources all around you while you adventure through Aeternum!

New-World-MiniMap A custom minimap that displays resources all around you while you adventure through Aeternum! Download Download Page Minimap.rar Oth

Dec 9, 2021

Facsimile - Copy Your Most Used Text to Clipboard Easily with Facsimile!. It Helps You to Store You Most Used Text as a Key, Value Pair and Copy it to Clipboard with a Shortcut.

Facsimile - Copy Your Most Used Text to Clipboard Easily with Facsimile!. It Helps You to Store You Most Used Text as a Key, Value Pair and Copy it to Clipboard with a Shortcut.

Facsimile An exact copy of Your Information ! Report Bug · Request Feature Table of Contents About The Project Built With Getting Started Installation

Sep 12, 2022

Automation Tests (REST-API with REST-ASSURED examples)

Automation Tests (REST-API with REST-ASSURED examples) Technology Stack IDEA Java Junit5 Gradle Selenide Allure Jenkins Rest-Assured See details: src/

Apr 11, 2022
Owner
Show me the code.
null
Provides many useful CRUD, Pagination, Sorting operations with Thread-safe Singleton support through the native JDBC API.

BangMapleJDBCRepository Inspired by the JpaRepository of Spring framework which also provides many capabilities for the CRUD, Pagination and Sorting o

Ngô Nguyên Bằng 5 Apr 7, 2022
A RatingBar library for android, you can customize size, spacing, color and image easily, and support right to left.

AndRatingBar A RatingBar library for android, you can customize size, spacing, color and image easily, and support right to left. 安卓RatingBar终极方案,继承自原

dqq 271 Aug 14, 2021
Change data capture for a variety of databases. Please log issues at https://issues.redhat.com/browse/DBZ.

Copyright Debezium Authors. Licensed under the Apache License, Version 2.0. The Antlr grammars within the debezium-ddl-parser module are licensed unde

Debezium 7.9k Dec 26, 2022
Mystral (pronounced "Mistral") is an efficient library to deal with relational databases quickly.

Mystral An efficient library to deal with relational databases quickly. A little request: read the Javadoc to understand how these elements work in de

null 13 Jan 4, 2023
A tool based on mysql-connector to simplify the use of databases, tables & columns

Description A tool based on mysql-connector to simplify the use of databases, tables & columns. This tool automatically creates the databases & tables

nz 6 Nov 17, 2022
A simple-to-use storage ORM supporting several databases for Java.

Storage Handler This is a library based off of my old storage handler within my queue revamp. It's for easy storage handling for multiple platforms. N

NV6 7 Jun 22, 2022
esProc SPL is a scripting language for data processing, with well-designed rich library functions and powerful syntax, which can be executed in a Java program through JDBC interface and computing independently.

esProc esProc is the unique name for esProc SPL package. esProc SPL is an open-source programming language for data processing, which can perform comp

null 990 Dec 27, 2022
jdbi is designed to provide convenient tabular data access in Java; including templated SQL, parameterized and strongly typed queries, and Streams integration

The Jdbi library provides convenient, idiomatic access to relational databases in Java. Jdbi is built on top of JDBC. If your database has a JDBC driv

null 1.7k Dec 27, 2022
HasorDB is a Full-featured database access tool, Providing object mapping,Richer type handling than Mybatis, Dynamic SQL

HasorDB is a Full-featured database access tool, Providing object mapping,Richer type handling than Mybatis, Dynamic SQL, stored procedures, more dialect 20+, nested transactions, multiple data sources, conditional constructors, INSERT strategies, multiple statements/multiple results. And compatible with Spring and MyBatis usage.

赵永春 17 Oct 27, 2022
MixStack lets you connects Flutter smoothly with Native pages, supports things like Multiple Tab Embeded Flutter View, Dynamic tab changing, and more. You can enjoy a smooth transition from legacy native code to Flutter with it.

中文 README MixStack MixStack lets you connects Flutter smoothly with Native pages, supports things like Multiple Tab Embeded Flutter View, Dynamic tab

Yuewen Engineering 80 Dec 19, 2022