Skip to content

The CLI-application for executing JPQL (Java Persistence Query Language) queries to the databases

Notifications You must be signed in to change notification settings

Terentich/jpql-executor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jpql-executor

Description

The simple CLI-application for executing JPQL (Java Persistence Query Language) queries to databases.

Requirements

It needs a Java Virtual Machine of at least version 1.6 (Java SE 6.0). If you want to build the jar from source, you will also need Maven.

Usage

  1. Build with Maven:

    mvn package
  2. Unpack created archive jpql-executor*.zip.

  3. Place the required JDBC-driver for your database into the lib directory.

  4. Run application with following syntax:

    jpql-executor.bat <entities archive> <unit name> <JPQL query>

    Where:
    entities archive - the jar-file with entity classes (@Entity),
    unit name - the persistence unit name described in the persistence.xml inside jar-file with entity classes,
    JPQL query - the query string

    Example:

    jpql-executor.bat entity.jar default "SELECT entity FROM Entity entity"

Restrictions

The application is execute in unmanaged environment as JavaSE program (without application container).
Therefore possible to use only persistence.xml with explicit database properties (url, user, password) and not with JNDI and other EE technologies.

License

The MetaJ library publish under the Apache Software License, Version 2.0.

Continuous Integration

Last build status on Travis CI:

Build Status

About

The CLI-application for executing JPQL (Java Persistence Query Language) queries to the databases

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published