DuckDBConnection.prepareStatement methods could be less strict
- Lingua principale
- C++
- Stelle
- 127
- Fork
- 80
- Merge medio
- 13h 49m
- PR unite (30g)
- 48
Descrizione
The `prepareStatement` methods in `DuckDBConnection` here:
https://github.com/duckdb/duckdb-java/blob/f7ae8cb492d5ffedec1042fbcfacc14ea3e03de5/src/main/java/org/duckdb/DuckDBConnection.java#L296
are currently all stubbed with `throw new SQLFeatureNotSupportedException("prepareStatement")`.
Until they are fully implemented, they could be rewritten so that certain calls may proceed if generated keys are not required. For instance, the call at L296 could be rewritten to:
```java
public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException {
if (autoGeneratedKeys == NO_GENERATED_KEYS) {
return prepareStatement(sql);
} else {
throw new SQLFeatureNotSupportedException("prepareStatement");
}
}
```
These methods as written are currently keeping me from utilizing duckdb with the [Jetbrains Exposed](https://github.com/JetBrains/Exposed) API, because the connection wrappers call `prepareStatement([sql], NO_GENERATED_KEYS)` instead of `prepareStatement([sql])`.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia in src/main/java/org/duckdb/DuckDBConnection.java, intorno agli overload di prepareStatement vicini alla riga 296, e confronta il loro attuale comportamento dello stub con la chiamata senza chiavi generate descritta nell'issue. Il lavoro è completato quando le chiamate idonee non falliscono più soltanto perché è stato usato l'overload, mentre le richieste di chiavi generate non supportate mantengono il comportamento di errore esistente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java, sql
- Ambito
- database
- Tipo di issue
- Funzionalità
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 58/100