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:
searchable list archive (1997)
I have observed and I am gone. (1998)
Updating a database once per day - An example (1998)
Formulas.db not working (2006)
Still Stumped on ShowNext...HELP! (1997)
Help name our technology! (1997)
Need help, multiple shipping options (2000)
Logging purchases (1997)
block serving .db files (2002)
RAM variables (1997)
Simple way to create unique SKU (1997)
Bug or syntax error on my part? (1997)
Faxing orders in place of email (1997)
Date Math bug (1998)
Cold Fusion Buster (1997)
select multiple (1997)
grouping nothing (2000)
[WebDNA] Client wants backup copy of site (2010)
slightly OT: advertising schemes (2004)
New commands in Final candidate (1997)