BerkeleyDB

 view release on metacpan or  search on metacpan

t/db-4.8.t  view on Meta::CPAN

	#print "put $r $BerkeleyDB::Error\n";
        $ret += $r;
    }
    ok $ret == 0 ;

    # check the records in the secondary
    is countRecords($primary), 3 ;
    is countRecords($secondary), 3 ;
    is countRecords($foreign), 3 ;

    # deleting from the foreign will cascade
    ok $foreign->db_del("flag") == 0;
    is countRecords($primary), 2 ;
    is countRecords($secondary), 2 ;
    is countRecords($foreign), 2 ;

    cmp_ok  $foreign->db_get("flag", $v), '==', DB_NOTFOUND;
    cmp_ok  $secondary->db_get("flag", $v), '==', DB_NOTFOUND;
    cmp_ok  $primary->db_get("red", $v), '==', DB_NOTFOUND;

    # adding to the primary when no foreign key will fail



( run in 0.986 second using v1.01-cache-2.11-cpan-49f99fa48dc )