[Haskell-beginners] breaking code to several lines

Gesh hseG gesh at gesh.uni.cx
Wed Jan 29 19:34:54 UTC 2014


>
>  On Mon, Dec 23, 2013 at 4:42 PM, Miro Karpis <miroslav.karpis at gmail.com>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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140129/10fcf302/attachment.html>


More information about the Beginners mailing list