[WebDNA] Wishlist: ignore whitespace in database changes

This WebDNA talk-list message is from

2016


It keeps the original formatting.
numero = 112936
interpreted = N
texte = 523 While most database record changes (append/replace) are pretty simple, = some of them can get pretty complex, and the code gets ugly fast.=20 this is actual code I wrote this morning: [append db=3D^data/dbstats.db&autonumber=3Did][!] = [/!]dbpath=3D[$path]&dbname=3D[$name]&firstseen=3D[$timestamp]&lastseen=3D= [$timestamp]&opencount=3D1&changecount=3D0[!] = [/!]&Fcv=3D[$fields]&Fpv=3D&Fdh=3D[$fields]&Fdhts=3D[$timestamp]&Fdl=3D[$f= ields]&Fdlts=3D[$timestamp]&Fmh=3D[$fields]&Fmhts=3D[$timestamp][!] = [/!]&Rcv=3D[$records]&Rpv=3D&Rdh=3D[$records]&Rdhts=3D[$timestamp]&Rdl=3D[= $records]&Rdlts=3D[$timestamp]&Rmh=3D[$records]&Rmhts=3D[$timestamp][!] = [/!]&Mcv=3D[$memory]&Fpv=3D&Mdh=3D[$memory]&Mdhts=3D[$timestamp]&Mdl=3D[$m= emory]&Mdlts=3D[$timestamp]&Mmh=3D[$memory]&Mmhts=3D[$timestamp]][!] = [/!]&Dcv=3D[$filesize]&Dpv=3D&Ddh=3D[$filesize]&Ddhts=3D[$timestamp]&Ddl=3D= [$filesize]&Ddlts=3D[$timestamp]&Dmh=3D[$filesize]&Dmhts=3D[$timestamp][!]= [/!][/append] all the comment tags look horrible and are onerous to type and = occasionally get messed up, which adds time to debug.=20 What if we had an ignorewhitespace=3DT modifier for append and replace = functions?=20 [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=99= t want to upset the purists. :P=20 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 . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Wishlist: ignore whitespace in database changes (Stuart Tremain 2016)
  2. Re: [WebDNA] Wishlist: ignore whitespace in database changes (Patrick McCormick 2016)
  3. Was: [WebDNA] Wishlist: ignore whitespace in database changes - Now: WebDNA Data Model (dbrooke@euca.us 2016)
  4. [BULK] Re: [WebDNA] Wishlist: ignore whitespace in database changes (Alex McCombie 2016)
  5. Was: [WebDNA] Wishlist: ignore whitespace in database changes - Now: WebDNA Data Model (dbrooke@euca.us 2016)
  6. Re: [WebDNA] Wishlist: ignore whitespace in database changes (christophe.billiottet@webdna.us 2016)
  7. Re: [WebDNA] Wishlist: ignore whitespace in database changes (Stuart Tremain 2016)
  8. Re: [WebDNA] Wishlist: ignore whitespace in database changes (Brian Burton 2016)
  9. Re: [WebDNA] Wishlist: ignore whitespace in database changes (Kenneth Grome 2016)
  10. Re: [WebDNA] Wishlist: ignore whitespace in database changes (christophe.billiottet@webdna.us 2016)
  11. Re: [WebDNA] Wishlist: ignore whitespace in database changes (Brian Burton 2016)
  12. Re: [WebDNA] Wishlist: ignore whitespace in database changes (dbrooke@euca.us 2016)
  13. [WebDNA] Wishlist: ignore whitespace in database changes (Brian Burton 2016)
523 While most database record changes (append/replace) are pretty simple, = some of them can get pretty complex, and the code gets ugly fast.=20 this is actual code I wrote this morning: [append db=3D^data/dbstats.db&autonumber=3Did][!] = [/!]dbpath=3D[$path]&dbname=3D[$name]&firstseen=3D[$timestamp]&lastseen=3D= [$timestamp]&opencount=3D1&changecount=3D0[!] = [/!]&Fcv=3D[$fields]&Fpv=3D&Fdh=3D[$fields]&Fdhts=3D[$timestamp]&Fdl=3D[$f= ields]&Fdlts=3D[$timestamp]&Fmh=3D[$fields]&Fmhts=3D[$timestamp][!] = [/!]&Rcv=3D[$records]&Rpv=3D&Rdh=3D[$records]&Rdhts=3D[$timestamp]&Rdl=3D[= $records]&Rdlts=3D[$timestamp]&Rmh=3D[$records]&Rmhts=3D[$timestamp][!] = [/!]&Mcv=3D[$memory]&Fpv=3D&Mdh=3D[$memory]&Mdhts=3D[$timestamp]&Mdl=3D[$m= emory]&Mdlts=3D[$timestamp]&Mmh=3D[$memory]&Mmhts=3D[$timestamp]][!] = [/!]&Dcv=3D[$filesize]&Dpv=3D&Ddh=3D[$filesize]&Ddhts=3D[$timestamp]&Ddl=3D= [$filesize]&Ddlts=3D[$timestamp]&Dmh=3D[$filesize]&Dmhts=3D[$timestamp][!]= [/!][/append] all the comment tags look horrible and are onerous to type and = occasionally get messed up, which adds time to debug.=20 What if we had an ignorewhitespace=3DT modifier for append and replace = functions?=20 [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=99= t want to upset the purists. :P=20 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 . Brian Burton

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:

[WebDNA] ONLY the FIRST continuous run of numeric chars? (2008) Error Lob.db records error message not name (1997) SMSI (Scott) clues?? Bug fixes for next WebDNA release (2005) unable to launch acgi in WebCat (1997) CGI Plugin memory (2001) Include a big block of text (1997) error 452 (2001) rotating thumbnails (1997) Webcatalog and foreign languages (1998) OR-searching (2000) MacAuthorize hub, no modal password dialog? (1997) [include] affect on filepaths for links? (1997) [format 40s]text[/format] doesn't work (1997) Robots fill event log (1997) WebCatalog and directory indexing (1998) Make sure I understand this??? (1997) [WebDNA] Digest http method authentication (2009) apparently to problem isolated (1997) Frustration with formulas.db (1999) Bug Report, maybe (1997)