Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Would you consider implementing server side statements #105

Open
@lud

Description

@lud

Hi,

I do not know if you know the depo elixir package, but it has an interesting feature.

This feature may be implemented in the Sqlitex.Server module.

Basically, you create a statement with a name. So instead of calling Sqlitex.Server.prepare(:example, "SELECT * FROM t") you would call Sqlitex.Server.register_statement(:example, :all_from_t, "SELECT * FROM t").

And now, you could call the statement with Sqlitex.Server.query(:example, :all_from_t)

The point is to liberate the user from the statements bookeeping as users do not need to keep the statement variable around, neither the SQL query binary. Plus, as the statement is only visible in the db server, it cannot be messed with by another process.

What do you think ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions