Database

Database -- the class of all database files.

     i1 = run "rm -f /tmp/tmpdbm*"
     
     o1 = 0
     
     i2 = x = openDatabaseOut "/tmp/tmpdbm"
     
     o2 = --database /tmp/tmpdbm--
     
     o2 : Database
     
     i3 = x#"first" = "hi there"
     
     o3 = "hi there"
     
     i4 = x#"first"
     
     o4 = "hi there"
     
     i5 = x#"second" = "ho there"
     
     o5 = "ho there"
     
     i6 = scanKeys(x,print)
     
     "first"
     "second"
     i7 = run "rm -f /tmp/tmpdbm*"
     
     o7 = 0
     
Functions:
  • openDatabase -- open a database file
  • openDatabaseOut -- open a database file for writing
  • close -- close a database file
  • # -- fetch or store in a database file
  • #? -- query a database file
  • firstkey -- get the first key
  • mutable -- whether changes can be made
  • nextkey -- get the next key
  • reorganize -- compactify a database file
  • scanKeys -- apply a function to each key
  • Go to main index.

    Go to concepts index.