How can I execute SQL with my plugin in Confluence ?

Alex March 15, 2021

Hi everyone, i found a way to do it via jira, using 

org.ofbiz.core.entity.jdbc.SQLProcessor sqlProcessor = null;

sqlProcessor = new org.ofbiz.core.entity.jdbc.SQLProcessor("defaultDS");

ResultSet rs=sqlProcessor.executeQuery(SQL_QUERY);

how can this be done in confluence ?

1 answer

0 votes
Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 15, 2021

Hi @Alex ,

would you please provide us information what you are trying to achieve? Which query you want to execute and why? Thank you.

Alex March 15, 2021

Hi)) I want to execute sql queries in db confluence like in jira, https://community.atlassian.com/t5/Answers-Developer-Questions/How-can-I-execute-SQL-with-my-plugin/qaq-p/568809 
for example, execute 

SHOW TABLES

 How can I do that with SQLProcessor in confluence?

Hana Kučerová
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 16, 2021

Hi @Alex ,

thank you. Please look at this article, whether it helps you.

It is still not very clear, what you're trying to do (besides getting the list of database tables). I'm asking because there are usually better ways how to achieve something then modify data directly in the database and I would strongly recommend you not to do it.

Alex March 21, 2021

thank you))*

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events