• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/ap/gpl/timemachine/db-4.7.25.NC/perl/DB_File/

Lines Matching refs:database

401     # $num_elems holds the current number of elements in the database.
552 # iterate through the database until either EOF ($status == 0)
630 number of database formats. B<DB_File> provides an interface to all
631 three of the database types currently supported by Berkeley DB.
639 This database type allows arbitrary key/value pairs to be stored in data
680 B<Note:> The database file format has changed multiple times in Berkeley
705 Berkeley DB uses the function dbopen() to open or create a database.
861 This example shows how to create a database, add key/value pairs to the
862 database, delete keys/value pairs and finally how to enumerate the
863 contents of the database.
959 ordering in a BTREE database:
965 The new compare function must be specified when you create the database.
969 You cannot change the ordering once the database has been created. Thus
971 database.
980 is stored in the database --- so (again with example above) assigning
982 the first key: 'KEY' in the database with three values. For some
1008 the flags element of C<$DB_BTREE> to R_DUP when creating the database.
1011 want to manipulate a BTREE database with duplicate keys. Consider this
1052 - the only thing is, when they are retrieved from the database they
1060 keys, but it cannot be used to read them back from the database.
1138 So assuming the database created above, we can use C<get_dup> like
1189 Assuming the database from the previous example:
1228 Again assuming the existence of the C<tree> database
1619 C<tie>, the underlying database file will I<not> be closed until both
1644 key specified did not exist in the database.
1705 from the database. The value read from the database is returned in the
1714 Stores the key/value pair in the database.
1724 Removes all key/value pairs with key C<$key> from the database.
1727 database.
1733 Returns the file descriptor for the underlying database.
1736 not use C<fd> to lock your database.
1740 This interface allows sequential retrieval from the database. See
1744 pair read from the database.
1761 DBM database.
1775 every time you write a key to a DBM database.
1780 every time you write a value to a DBM database.
1786 every time you read a key from a DBM database.
1791 every time you read a value from a DBM database.
1810 Consider the following scenario. You have a DBM database
1815 you write to the database you will have to use something like this:
1825 the database and have them removed when you read from the database. As I'm
1860 a DBM database it always writes the key and value as strings. So when
1865 the key 12345 will get stored in the DBM database as the 5 byte string
1866 "12345". If you actually want the key to be stored in the DBM database
1926 Use "tie" to open the database.
1930 Lock the database with fd & flock.
1934 Read & Write to the database.
1938 Unlock and close the database.
1943 database in step 2 is that an initial block from the database will get
1947 say "A" and "B", both want to update the same B<DB_File> database
1949 opened the database and has a write lock, but it hasn't actually updated
1950 the database yet (it has finished step 2, but not started step 3 yet). Now
1951 process "B" tries to open the same database - step 1 will succeed,
1954 processes will have cached identical initial blocks from the database.
1956 Now process "A" updates the database and happens to change some of the
1958 all cached data to disk and releasing the database lock. At this point
1959 the database on disk will correctly reflect the changes made by process
1963 database and unfortunately it too modifies the data that was in its
1965 some/all of the changes process "A" made to the database.
1967 The result of this scenario is at best a database that doesn't contain
1968 what you expect. At worst the database will corrupt.
1971 B<DB_File> database, but it does illustrate why the technique should
1974 =head2 Safe ways to lock a database
1991 A B<DB_File> wrapper which creates copies of the database file for
1998 A B<DB_File> wrapper that has the ability to lock and unlock the database
2000 re-tie-ing the database when you get or drop a lock. Because of the
2009 before tie-ing the database and drops the lock after the untie. Allows
2018 There is no technical reason why a Berkeley DB database cannot be
2026 visit along with the time you last visited them in a DB_HASH database.
2028 field in the database is the location string and the value field is the
2033 database.
2052 # Dump the complete database
2119 reference, so the destructor will not get called and the database file
2121 attempt to open a database that is already open via the catch-all
2145 =head2 Why is there Perl source in my database?
2147 If you look at the contents of a database file created by DB_File,
2151 buffers which will subsequently be written to the database file. Being
2155 where a Perl script gets written to the database, the random junk will
2160 scripts embedded in a database file, this is nothing to worry about.
2182 Attempting to reopen a database without closing it.