Re: [WebDNA] Wishlist: ignore whitespace in database changes
This WebDNA talk-list message is from 2016
It keeps the original formatting.
numero = 112940
interpreted = N
texte = 527Hey Brian, glad to see you are still hacking away at WebDNA. :-)Of course, this has always been a hack that we WebDNA'ers have employed=20to give our eyes some ability to see what is going on with the code.I personally haven't taken the time to do this, but perhaps a custom=20function could take care of this.Something like (untested):Function-----------------[function name=3Deuca_dbHelper][return][grep search=3D%09&replace=3D%26][param_string][/grep][/return][/function]Call function-------------------------[append db=3D^data/dbstats.db&autonumber=3Did][euca_dbHelperdbpath=3D[url][$path][/url]dbname=3D[url][$name][/url]firstseen=3D[$timestamp]lastseen=3D[$timestamp]opencount=3D1changecount=3D0][/append]Obviously, the values entered in the call are suspect to break this if=20they contain tabs or returns.. but maybe URL'ing or something else would=20solve that problem.Let us know if you come up with something that works.However, I agree with you that the format similar to:[append db=3D^data/dbstats.db&autonumber=3Did]dbpath=3D[url][$path][/url]dbname=3D[url][$name][/url]firstseen=3D[$timestamp]lastseen=3D[$timestamp]opencount=3D1changecount=3D0[/append]Would be a nifty addition to WebDNA.DonovanOn 2016-08-30 11:26, Brian Burton wrote:> While most database record changes (append/replace) are pretty> simple, some of them can get pretty complex, and the code gets ugly> fast.>> this is actual code I wrote this morning:>> [append db=3D^data/dbstats.db&autonumber=3Did][!]>=20> [/!]dbpath=3D[$path]&dbname=3D[$name]&firstseen=3D[$timestamp]&lastsee=n=3D[$timestamp]&opencount=3D1&changecount=3D0[!]>=20> [/!]&Fcv=3D[$fields]&Fpv=3D&Fdh=3D[$fields]&Fdhts=3D[$timestamp]&Fdl=3D=[$fields]&Fdlts=3D[$timestamp]&Fmh=3D[$fields]&Fmhts=3D[$timestamp][!]>=20> [/!]&Rcv=3D[$records]&Rpv=3D&Rdh=3D[$records]&Rdhts=3D[$timestamp]&Rdl==3D[$records]&Rdlts=3D[$timestamp]&Rmh=3D[$records]&Rmhts=3D[$timestamp][=!]>=20> [/!]&Mcv=3D[$memory]&Fpv=3D&Mdh=3D[$memory]&Mdhts=3D[$timestamp]&Mdl=3D=[$memory]&Mdlts=3D[$timestamp]&Mmh=3D[$memory]&Mmhts=3D[$timestamp]][!]>=20> [/!]&Dcv=3D[$filesize]&Dpv=3D&Ddh=3D[$filesize]&Ddhts=3D[$timestamp]&D=dl=3D[$filesize]&Ddlts=3D[$timestamp]&Dmh=3D[$filesize]&Dmhts=3D[$timesta=mp][!]> [/!][/append]>> all the comment tags look horrible and are onerous to type and> occasionally get messed up, which adds time to debug.> What if we had an ignorewhitespace=3DT modifier for append and replace> functions?>> [append db=3D^data/dbstats.db&autonumber=3Did&ignorewhitespace=3DT]> dbpath=3D[$path]> &dbname=3D[$name]> &firstseen=3D[$timestamp]> &lastseen=3D[$timestamp]> &opencount=3D1> &changecount=3D0> =E2=80=A6 etc ...> [/append]>> Heck, even the ampersands seem superfluous at that point, but I don=E2=80==99t> want to upset the purists. :P> If one desires to store away line feeds, they could just [url] the> value being stored (which should done anyway) and problem solved.>> Brian B. Burton>>>> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us.
Associated Messages, from the most recent to the oldest:
527Hey Brian, glad to see you are still hacking away at WebDNA. :-)Of course, this has always been a hack that we WebDNA'ers have employed=20to give our eyes some ability to see what is going on with the code.I personally haven't taken the time to do this, but perhaps a custom=20function could take care of this.Something like (untested):Function-----------------[function name=3Deuca_dbHelper][return][grep search=3D%09&replace=3D%26][param_string][/grep][/return][/function]Call function-------------------------[append db=3D^data/dbstats.db&autonumber=3Did][euca_dbHelperdbpath=3D[url][$path][/url]dbname=3D[url][$name][/url]firstseen=3D[$timestamp]lastseen=3D[$timestamp]opencount=3D1changecount=3D0][/append]Obviously, the values entered in the call are suspect to break this if=20they contain tabs or returns.. but maybe URL'ing or something else would=20solve that problem.Let us know if you come up with something that works.However, I agree with you that the format similar to:[append db=3D^data/dbstats.db&autonumber=3Did]dbpath=3D[url][$path][/url]dbname=3D[url][$name][/url]firstseen=3D[$timestamp]lastseen=3D[$timestamp]opencount=3D1changecount=3D0[/append]Would be a nifty addition to WebDNA.DonovanOn 2016-08-30 11:26, Brian Burton wrote:> While most database record changes (append/replace) are pretty> simple, some of them can get pretty complex, and the code gets ugly> fast.>> this is actual code I wrote this morning:>> [append db=3D^data/dbstats.db&autonumber=3Did][!]>=20> [/!]dbpath=3D[$path]&dbname=3D[$name]&firstseen=3D[$timestamp]&lastsee=n=3D[$timestamp]&opencount=3D1&changecount=3D0[!]>=20> [/!]&Fcv=3D[$fields]&Fpv=3D&Fdh=3D[$fields]&Fdhts=3D[$timestamp]&Fdl=3D=[$fields]&Fdlts=3D[$timestamp]&Fmh=3D[$fields]&Fmhts=3D[$timestamp][!]>=20> [/!]&Rcv=3D[$records]&Rpv=3D&Rdh=3D[$records]&Rdhts=3D[$timestamp]&Rdl==3D[$records]&Rdlts=3D[$timestamp]&Rmh=3D[$records]&Rmhts=3D[$timestamp][=!]>=20> [/!]&Mcv=3D[$memory]&Fpv=3D&Mdh=3D[$memory]&Mdhts=3D[$timestamp]&Mdl=3D=[$memory]&Mdlts=3D[$timestamp]&Mmh=3D[$memory]&Mmhts=3D[$timestamp]][!]>=20> [/!]&Dcv=3D[$filesize]&Dpv=3D&Ddh=3D[$filesize]&Ddhts=3D[$timestamp]&D=dl=3D[$filesize]&Ddlts=3D[$timestamp]&Dmh=3D[$filesize]&Dmhts=3D[$timesta=mp][!]> [/!][/append]>> all the comment tags look horrible and are onerous to type and> occasionally get messed up, which adds time to debug.> What if we had an ignorewhitespace=3DT modifier for append and replace> functions?>> [append db=3D^data/dbstats.db&autonumber=3Did&ignorewhitespace=3DT]> dbpath=3D[$path]> &dbname=3D[$name]> &firstseen=3D[$timestamp]> &lastseen=3D[$timestamp]> &opencount=3D1> &changecount=3D0> =E2=80=A6 etc ...> [/append]>> Heck, even the ampersands seem superfluous at that point, but I don=E2=80==99t> want to upset the purists. :P> If one desires to store away line feeds, they could just [url] the> value being stored (which should done anyway) and problem solved.>> Brian B. Burton>>>> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list .To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us.
dbrooke@euca.us
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
More on the email templates (1997)
Time to opensource? was [SMSI] WebDNA is too good to (2006)
Associative lookup style? + bit more (1997)
shipcost (1997)
looking for developers with solutions (2000)
Where is f2? (1997)
Webcat no longer supported? (2006)
WebCat2b12 - nesting [tags] (1997)
Mime-Version in email header (1997)
2 easy questions re: [showif] and [sendmail] (1997)
Expected Behavior? (1999)
Webcat Manual and TeaRoom Examples Uses Different Examples. (1997)
Intermitent problem using [referrer] (1997)
searchable list archive (1997)
Math (1997)
Security (1998)
Email (2000)
View order not right (1997)
email bounce check (2002)
[taxRate] [TaxTotal] ? (1997)