breaking code to several lines

Hi please,... I have one sql insert statement which is too long to be on one line. Is there a way that I can break it several lines? Or does it have to be everything in one line? here is the query: execute_ conn "INSERT INTO ttableXY (column1, column2, column3, column4, column5, column6, column7) VALUES ('var1', 'var2', 'var3', 'var4', 'var5', 'var6', 'var7')" Thanks, Miro

On Mon, Dec 23, 2013 at 4:42 PM, Miro Karpis
Hi please,... I have one sql insert statement which is too long to be on one line. Is there a way that I can break it several lines? Or does it have to be everything in one line?
See "string gaps" in http://www.haskell.org/onlinereport/haskell2010/haskellch2.html#x7-200002.6 -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Another option is a string quasiquoter. There are several options
available, non interpolating ones ones such as string-qq or string-quote,
as well as ones that allow you to interpolate variables, like
interpolatedstring-qq.
On Mon, Dec 23, 2013 at 4:42 PM, Miro Karpis
Hi please,... I have one sql insert statement which is too long to be on one line. Is there a way that I can break it several lines? Or does it have to be everything in one line?
here is the query: execute_ conn "INSERT INTO ttableXY (column1, column2, column3, column4, column5, column6, column7) VALUES ('var1', 'var2', 'var3', 'var4', 'var5', 'var6', 'var7')"
Thanks, Miro
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

thank you very much
m.
On Mon, Dec 23, 2013 at 10:57 PM, David McBride
Another option is a string quasiquoter. There are several options available, non interpolating ones ones such as string-qq or string-quote, as well as ones that allow you to interpolate variables, like interpolatedstring-qq.
On Mon, Dec 23, 2013 at 4:42 PM, Miro Karpis
wrote: Hi please,... I have one sql insert statement which is too long to be on one line. Is there a way that I can break it several lines? Or does it have to be everything in one line?
here is the query: execute_ conn "INSERT INTO ttableXY (column1, column2, column3, column4, column5, column6, column7) VALUES ('var1', 'var2', 'var3', 'var4', 'var5', 'var6', 'var7')"
Thanks, Miro
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

On Mon, Dec 23, 2013 at 4:42 PM, Miro Karpis
wrote: Hi please,... I have one sql insert statement which is too long to be on one line. Is there a way that I can break it several lines? Or does it have to be everything in one line?
here is the query: execute_ conn "INSERT INTO ttableXY (column1, column2, column3, column4, column5, column6, column7) VALUES ('var1', 'var2', 'var3', 'var4', 'var5', 'var6', 'var7')"
Thanks, Miro
In addition, you could break the string into two strings and append them.
That is, execute_conn $ "INSERT INTO ttableXY (column1, column2, column3, column4, column5, column6, column7) " ++ "VALUES ('var1', 'var2', 'var3', 'var4', 'var5', 'var6', 'var7')" HTH, Gesh
participants (4)
-
Brandon Allbery
-
David McBride
-
Gesh hseG
-
Miro Karpis