Skip to content

JDBC - statement/resultset #13

@dgradecak

Description

@dgradecak

after looking a bit at the code, I would recommend to correct the DB access in a sense where resources should be closed.

Prepared statements should be in try with resources as well as Resultsets, however in order to achive this there should be a small refactoring here

public ResultSet executeQuery(String sqlRequest, Object... args) throws SQLException

this should either return the statement or a custom class, however I might refoctor this if you want and add different things that I have in mind to make this correct.

When those resources are not closed properly, the GC (garbage collector) would not clean those and thus memory problems might araise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions