public interface DbConnection
DbConnectionManager
Modifier and Type | Method and Description |
---|---|
void |
commit() |
com.querydsl.sql.dml.SQLDeleteClause |
delete(com.querydsl.sql.RelationalPath<?> entity)
Starts an delete statement on the given DB Table.
|
Connection |
getJdbcConnection()
Returns the JDBC connection wrapped by this object.
|
IdGeneratingSQLInsertClause |
insert(JiraRelationalPathBase<?> entity)
Starts an insert statement on the given DB Table.
|
com.querydsl.sql.SQLQuery<?> |
newSqlQuery()
Starts a SELECT statement on this connection.
|
void |
rollback() |
void |
setAutoCommit(boolean autoCommit) |
com.querydsl.sql.dml.SQLUpdateClause |
update(com.querydsl.sql.RelationalPath<?> entity)
Starts an update statement on the given DB Table.
|
Connection getJdbcConnection()
com.querydsl.sql.SQLQuery<?> newSqlQuery()
Example usage:
QVersion v = new QVersion("v"); final Listversions = dbConnection.newSqlQuery() .select(v) .from(v) .where(v.project.eq(projectId)) .orderBy(v.sequence.asc()) .fetch();
IdGeneratingSQLInsertClause insert(JiraRelationalPathBase<?> entity)
Example 1 usage:
dbConnection.insert(QIssueLink.ISSUE_LINK) .set(QIssueLink.ISSUE_LINK.linktype, newIssueLinkTypeId) .set(QIssueLink.ISSUE_LINK.sequence, sequence) .execute();
Example 2 usage:
dbConnection.insert(QIssueLink.ISSUE_LINK) .populate(issueLinkDTO) .execute();
entity
- The DB entity you want to insert into eg QIssue.ISSUE
com.querydsl.sql.dml.SQLUpdateClause update(com.querydsl.sql.RelationalPath<?> entity)
Example usage:
dbConnection.update(QIssueLink.ISSUE_LINK) .set(QIssueLink.ISSUE_LINK.linktype, newIssueLinkTypeId) .where(QIssueLink.ISSUE_LINK.id.eq(issueLink.getId())) .execute();
entity
- The DB entity you want to update eg QIssue.ISSUE
com.querydsl.sql.dml.SQLDeleteClause delete(com.querydsl.sql.RelationalPath<?> entity)
Example usage:
dbConnection.delete(QIssueLink.ISSUE_LINK) .where(QIssueLink.ISSUE_LINK.id.eq(issueLink.getId())) .execute();
entity
- The DB entity you want to delete from eg QIssue.ISSUE
void setAutoCommit(boolean autoCommit)
void commit()
void rollback()
Copyright © 2002-2022 Atlassian. All Rights Reserved.