Add DatabaseObject.executePreparedRetrieval() method #55

Merged
p3k merged 1 commit from 54-add-support-for-prepared-sql-statements-to-databaseobject into helma-🐜 2023-03-05 12:10:25 +00:00
p3k commented 2023-03-05 12:09:28 +00:00 (Migrated from github.com)

Example code:

const sql = 'select * from foo where bar = ?';
const db = getDBConnection('foobar');
const connection = db.getMetaData().getConnection();
const statement = connection.prepareStatement(sql);
statement.setInt(1, 23);
const rows = db.executePreparedRetrieval(statement);
// Resulting SQL query: select * from foo where bar = 23;
Example code: ```js const sql = 'select * from foo where bar = ?'; const db = getDBConnection('foobar'); const connection = db.getMetaData().getConnection(); const statement = connection.prepareStatement(sql); statement.setInt(1, 23); const rows = db.executePreparedRetrieval(statement); // Resulting SQL query: select * from foo where bar = 23; ```
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: antville/helma#55
No description provided.