home bbs files messages ]

Just a sample of the Echomail archive

Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.

   SYNC_SYSOPS      Synchronet Multinode BBS Software Suppor      33,243 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 31,925 of 33,243   
   nelgin to All   
   SQLite for Synchronet   
   05 May 25 11:38:53   
   
   TZUTC: -0500   
   MSGID: 58010.sync_sys@1:103/705 2c7f033c   
   PID: Synchronet 3.21a-Linux master/bad030f77 May 03 2025 GCC 13.3.0   
   TID: SBBSecho 3.25-Linux master/0c503c4ea May 04 2025 GCC 12.2.0   
   BBSID: EOTLBBS   
   CHRS: CP437 2   
   FORMAT: flowed   
   NOTE: FSEditor.js v1.105   
   Hi all,   
      
   With much help from Digital Man, I have added the abilty use SQLite databases   
   through JavaScript within Synchronet. It's a work in progress and always happy   
   to accept patches and the like.   
      
   It's not been merged yet and will only work on Linux so far, You'll need to   
   checkout the sqlite branch and make sure you have libsqlite3 installed.   
      
   // open a new database object. This will create the database if it doesn't   
   // exist   
   var db = new Sqlite("/tmp/base1");   
   if (!db.open())   
       writeln ("Unable to open database: " + db.errormsg);   
      
   // Create a table for our data   
   if (db.exec("CREATE TABLE test (firstname text , lastname text)"))   
       writeln ("Table created");   
   else   
       writeln ("Unable to create table: " + db.errormsg);   
      
   // insert a row into the database   
   if (db.exec("INSERT INTO test VALUES ('Fred','Smith'),('Joe','Bl   
   ggs'),('Jimmy','Jones')"))   
       writeln ("Row inserted");   
   else   
       writeln ("Unable to insert row" + db.errormsg);   
      
   // Query the database and print results   
   var ret;   
   var row;   
   if (ret = db.exec("SELECT firstname,lastname FROM test")) {   
       for (row in ret) {   
           writeln (ret[row].firstname + " " + ret[row].lastname);   
       }   
   }   
   else {   
       writeln ("Unable to fetch rows" + db.errormsg);   
   }   
      
   // close the database   
   db.close();   
      
      
   This may need futher work to be able to use PREPAREd statements and the like   
   but your basic SQL functions are going to work. Right now it's up to the user   
   to properly encode the text to UTF-8 and escape any values but this will be   
   added later, I'm sure, by someone more knowledgable than me.   
      
   ---   
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com   
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)   
   SEEN-BY: 103/13 705 105/81 106/201 124/5016 128/187 153/757 7715 154/10   
   SEEN-BY: 154/30 110 203/0 218/700 221/0 226/30 227/114 229/110 114   
   SEEN-BY: 229/206 317 400 426 428 470 550 700 705 240/1120 5832 263/1   
   SEEN-BY: 266/512 280/464 5003 5006 291/111 292/8125 301/1 320/219   
   SEEN-BY: 322/757 341/66 234 342/200 396/45 423/120 460/58 256 1124   
   SEEN-BY: 467/888 633/280 712/848 770/1 902/26 5020/400 8912 5054/30   
   SEEN-BY: 5075/35   
   PATH: 103/705 280/464 460/58 229/426   
      

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca