apache / apache/netbeans

Sql editor improvement for batch execution support

Open
#4,761 0 comments 0 reactions 0 assignees View on GitHub
kind:feature needs:triage
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Description

Sometimes I using sql editor to fill new table. My sql-scripts looks like that:
![image](https://user-images.githubusercontent.com/33724393/194776741-74710d03-efa9-45ca-846a-2c7a249aaf21.png)
If the script contains a huge number of lines, its execution is a very slow action. To speed up this action would be good use
`java.sql.Statement` method `executeBatch`.

### Use case/motivation

In a UI, this could be a toggle button, like [ToggleKeepOldResultTabsAction](https://github.com/apache/netbeans/blob/master/ide/db.sql.editor/src/org/netbeans/modules/db/sql/editor/ui/actions/ToggleKeepOldResultTabsAction.java):
![image](https://user-images.githubusercontent.com/33724393/194777396-bf07779e-953f-4198-bb33-036ed7fd13d7.png)

### Related issues

_No response_

### Are you willing to submit a pull request?

Yes

### Code of Conduct

Yes

Contributor guide

Open the contributing guide

Research direction

Start by reading the SQL editor execution path and the referenced ToggleKeepOldResultTabsAction.java. Compare the current script execution with java.sql.Statement.executeBatch and determine how a UI toggle should select batch execution. Done means the SQL editor offers the requested toggle and executes applicable scripts in batches without losing existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
database, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.