Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Would it be possible to add something like an "execParamStatement' ... " function? #6

Open
FredrikKarlssonSpeech opened this issue Sep 3, 2014 · 2 comments

Comments

@FredrikKarlssonSpeech
Copy link

Hi,

Sorry for asking this, but due to the differences between HDBC.SQLite and your Database.SQLite, what I need to do kind of falls in between the capabilities of the two modules.

Would it be possible, do you think, to add something like an

execParamStatement' :: SQLiteResult a => SQLiteHandle -> String -> [Value] -> IO (Either String [[Row a]])

function that substitute parameters in order (like HDBC execute)? I need to construct dynamic queries, and the steps involved in generating and splicing randomized labels to make it all work with execParamStatement does not seem very unnatural for this kind of application. But, if you need regexp matching too in the SQLite queries, then you also cannot use HDBC, so.. Please consider it.

@FredrikKarlssonSpeech FredrikKarlssonSpeech changed the title Would it be possible to add something like an "execParamStatement' :: SQLiteResult a => SQLiteHandle -> String -> [Value] -> IO (Either String [[Row a]])" funktion? Would it be possible to add something like an "execParamStatement' ... " funktion? Sep 3, 2014
@FredrikKarlssonSpeech FredrikKarlssonSpeech changed the title Would it be possible to add something like an "execParamStatement' ... " funktion? Would it be possible to add something like an "execParamStatement' ... " function? Sep 3, 2014
@acw
Copy link
Contributor

acw commented Sep 3, 2014

Seems like a good feature, and worth adding. I don't suppose you'd be interested in generating a patch for it? Unfortunately my project backlog is pretty significant, so it might be awhile if you wait for me.

@FredrikKarlssonSpeech
Copy link
Author

Hi,

Looking at the code I have to admit that it seems way beyond my haskell
skills right now. However, my haskell is steadily improving, so once I'm at
the point where I get what is happening in the current implementation, I'll
definitely make an effort to submit a patch.
So, let's see what comes along first then - my haskell skills or the bottom
of your to do list.

Fredrik

onsdag 3 september 2014 skrev Adam Wick [email protected]:

Seems like a good feature, and worth adding. I don't suppose you'd be
interested in generating a patch for it? Unfortunately my project backlog
is pretty significant, so it might be awhile if you wait for me.


Reply to this email directly or view it on GitHub
#6 (comment).

"Life is like a trumpet - if you don't put anything into it, you don't get
anything out of it."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants