JBStrap Native Sql

JPA DAO API enables you to execute native SQL statements and also to start a database connection which may be used as JDBC. You can also query a sequence from the database if you use a database that supports sequences. All this means that the API is perfectly capable of servicing any type of request.

When using native SQL statements, the API supports queries ( select ) and modification requests. Upon executing the statements, the results will be returned in a list of data records, thereby ensuring compatibility with the framework. Also, you can send DDL statements to the database, as this is how you can modify a data structure in run-time.

Getting a standard JDBC connection using the JPA DAO API:

Executing a native SQL query without parameters:

Executing a native SQL query and parameter binding:

Executing native DML statements without parameters:

Executing a native DML statement and parameter binding:

Executing a native DDL statement: