Skip to content

Providing access to colNames from sqlite.Stmt #117

@davidjb

Description

@davidjb

Would it be feasible to allow or provide access to Stmt.colNames? I'm returning slices of values within a ResultFunc (to avoid the overhead of repeated maps) so having the column name to index lookup would be useful.

I'm currently iterating through the ColumnCount() and pulling out stmt.ColumnName(i) one-by-one - easy enough to do, but duplicates the logic and work already done within Conn.prepare. I recognise colNames is used internally by the various getters so modification were a concern, perhaps a function like ColumnNames() might return a clone of the map instead.

Thanks for the consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions