The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Hana Kučerová
Community Champion
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 Champion
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))*

TAGS
AUG Leaders

Atlassian Community Events