[MonetDB-users] Is it possible getting types IN params or result set?
Hi, I'd like to work on embedding query statements into the haskell language by using template haskell to automatically derive insert and select functions having proper types automatically. sqli for Java already does it. resulting in something as: (rows :: [ (Int, String) ]) = $( select "SELECT intV, stringV FROM table") $( ) means a function is automatically created returning a list of tules of type (Int, String). Because haskell is strongly typed the function select creating the the type safe function must get to know which type the query will return. When using INSERT statements it would be nice to also now which type of parameters have to be passed. Does MonetDB provide kind of query function WhichInOutTypesDoesQueryHave("SELECT ..") or WhichInOutTypesDoesQueryHave("INSERT INTO FOO (abc,def) VALUES (?,?)") This way syntax and semantics could be checked at compile time. Sincerly Marc Weber
On 29-05-2008 01:09:09 +0200, Marc Weber wrote:
Does MonetDB provide kind of query function WhichInOutTypesDoesQueryHave("SELECT ..") or WhichInOutTypesDoesQueryHave("INSERT INTO FOO (abc,def) VALUES (?,?)")
This way syntax and semantics could be checked at compile time.
We only have this at runtime, as result of what the engine has parsed and produced. Alternatively, you could use a prepared-statement, but off the top of my head I don't know if that returns the return-type of the result.
On Thu, May 29, 2008 at 09:40:33AM +0200, Fabian Groffen wrote:
On 29-05-2008 01:09:09 +0200, Marc Weber wrote:
Does MonetDB provide kind of query function WhichInOutTypesDoesQueryHave("SELECT ..") or WhichInOutTypesDoesQueryHave("INSERT INTO FOO (abc,def) VALUES (?,?)")
This way syntax and semantics could be checked at compile time.
We only have this at runtime, as result of what the engine has parsed and produced. So it wouldn't be too hard to just add a possibility to query this information without changing any db data?
That's good news :) Thanks Marc Weber
On Thu, May 29, 2008 at 09:40:33AM +0200, Fabian Groffen wrote:
On 29-05-2008 01:09:09 +0200, Marc Weber wrote:
Does MonetDB provide kind of query function WhichInOutTypesDoesQueryHave("SELECT ..") or WhichInOutTypesDoesQueryHave("INSERT INTO FOO (abc,def) VALUES (?,?)")
This way syntax and semantics could be checked at compile time. We only have this at runtime, as result of what the engine has parsed and produced. So it wouldn't be too hard to just add a possibility to query this information without changing any db data? This information is available, but addition of this code is not trivial in the context of the complete software stack (and Haskell api). We lack the manpower to invest in this area at this time. You can file a feature request, to be picked up by someone
Marc Weber wrote: that takes care of the Haskell interface and interaction with the kernel. regards, Martin
That's good news :)
Thanks
Marc Weber
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
On Thu, May 29, 2008 at 12:41:14PM +0200, Martin Kersten wrote:
On Thu, May 29, 2008 at 09:40:33AM +0200, Fabian Groffen wrote:
On 29-05-2008 01:09:09 +0200, Marc Weber wrote:
Does MonetDB provide kind of query function WhichInOutTypesDoesQueryHave("SELECT ..") or WhichInOutTypesDoesQueryHave("INSERT INTO FOO (abc,def) VALUES (?,?)")
This way syntax and semantics could be checked at compile time. We only have this at runtime, as result of what the engine has parsed and produced. So it wouldn't be too hard to just add a possibility to query this information without changing any db data? This information is available, but addition of this code is not trivial in the context of the complete software stack (and Haskell api). We lack the manpower to invest in this area at this time. You can file a feature request, to be picked up by someone
Marc Weber wrote: that takes care of the Haskell interface and interaction with the kernel.
regards, Martin
Hi Martin, I might be interested in this job. Neither I have installed MonetDB yet nor read your License.. but MonetDB seems to support all features I'm interested in such as checking constraints. So do you have someone working on haskell interfaces? Are you interested in letting me try to do this part? Thanks Marc Weber
Marc Weber wrote:
On Thu, May 29, 2008 at 12:41:14PM +0200, Martin Kersten wrote:
On Thu, May 29, 2008 at 09:40:33AM +0200, Fabian Groffen wrote:
On 29-05-2008 01:09:09 +0200, Marc Weber wrote:
Does MonetDB provide kind of query function WhichInOutTypesDoesQueryHave("SELECT ..") or WhichInOutTypesDoesQueryHave("INSERT INTO FOO (abc,def) VALUES (?,?)")
This way syntax and semantics could be checked at compile time. We only have this at runtime, as result of what the engine has parsed and produced. So it wouldn't be too hard to just add a possibility to query this information without changing any db data? This information is available, but addition of this code is not trivial in the context of the complete software stack (and Haskell api). We lack the manpower to invest in this area at this time. You can file a feature request, to be picked up by someone
Marc Weber wrote: that takes care of the Haskell interface and interaction with the kernel.
regards, Martin
Hi Martin, I might be interested in this job. Neither I have installed MonetDB yet nor read your License.. but MonetDB seems to support all features I'm interested in such as checking constraints. So do you have someone working on haskell interfaces? no, see above Are you interested in letting me try to do this part? go ahead the code is open source
Thanks Marc Weber
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
participants (3)
-
Fabian Groffen
-
Marc Weber
-
Martin Kersten