Lines Matching refs:key

65 	DBT		key, data;
74 DBTzero( &key );
75 key.size = e->e_nname.bv_len + 2;
76 key.ulen = key.size;
77 key.flags = DB_DBT_USERMEM;
78 buf = op->o_tmpalloc( key.size, op->o_tmpmemctx );
79 key.data = buf;
92 rc = db->put( db, txn, &key, &data, DB_NOOVERWRITE );
107 rc = db->put( db, txn, &key, &data, DB_NOOVERWRITE );
121 key.size = pdn.bv_len + 2;
122 key.ulen = key.size;
124 key.data = pdn.bv_val-1;
127 rc = bdb_idl_insert_key( op->o_bd, db, txn, &key, e->e_id );
145 rc = bdb_idl_insert_key( op->o_bd, db, txn, &key, e->e_id );
158 key.size = pdn.bv_len + 2;
159 key.ulen = key.size;
160 key.data = pdn.bv_val - 1;
181 DBT key;
189 DBTzero( &key );
190 key.size = e->e_nname.bv_len + 2;
191 buf = op->o_tmpalloc( key.size, op->o_tmpmemctx );
192 key.data = buf;
193 key.flags = DB_DBT_USERMEM;
205 rc = db->del( db, txn, &key, 0 );
217 rc = bdb_idl_delete_key( op->o_bd, db, txn, &key, e->e_id );
231 key.size = pdn.bv_len + 2;
232 key.ulen = key.size;
234 key.data = pdn.bv_val - 1;
237 rc = bdb_idl_delete_key( op->o_bd, db, txn, &key, e->e_id );
255 rc = bdb_idl_delete_key( op->o_bd, db, txn, &key, e->e_id );
267 key.size = pdn.bv_len + 2;
268 key.ulen = key.size;
269 key.data = pdn.bv_val - 1;
292 DBT key, data;
297 DBTzero( &key );
298 key.size = dn->bv_len + 2;
299 key.data = op->o_tmpalloc( key.size, op->o_tmpmemctx );
300 ((char *)key.data)[0] = DN_BASE_PREFIX;
301 AC_MEMCPY( &((char *)key.data)[1], dn->bv_val, key.size - 1 );
316 rc = cursor->c_get( cursor, &key, &data, DB_SET );
330 op->o_tmpfree( key.data, op->o_tmpmemctx );
340 DBT key, data;
348 DBTzero( &key );
349 key.size = e->e_nname.bv_len + 2;
350 key.data = op->o_tmpalloc( key.size, op->o_tmpmemctx );
351 ((char *)key.data)[0] = DN_ONE_PREFIX;
352 AC_MEMCPY( &((char *)key.data)[1], e->e_nname.bv_val, key.size - 1 );
355 rc = bdb_idl_cache_get( bdb, db, &key, NULL );
357 op->o_tmpfree( key.data, op->o_tmpmemctx );
369 rc = db->get( db, txn, &key, &data, bdb->bi_db_opflags );
370 op->o_tmpfree( key.data, op->o_tmpmemctx );
390 DBT key;
408 DBTzero( &key );
409 key.size = ndn->bv_len + 2;
410 key.ulen = key.size;
411 key.flags = DB_DBT_USERMEM;
412 key.data = op->o_tmpalloc( key.size, op->o_tmpmemctx );
413 ((char *)key.data)[0] = prefix;
414 AC_MEMCPY( &((char *)key.data)[1], ndn->bv_val, key.size - 1 );
417 rc = bdb_idl_fetch_key( op->o_bd, db, txn, &key, ids, NULL, 0 );
431 op->o_tmpfree( key.data, op->o_tmpmemctx );
442 * the same key. Also, the first item under the key contains the entry's own
459 /* Sort function for the sorted duplicate data items of a dn2id key.
553 DBT key, data;
579 DBTzero(&key);
581 key.size = sizeof(ID);
582 key.flags = DB_DBT_USERMEM;
585 key.data = &nid;
596 db->put( db, txn, &key, &data, DB_NODUPDATA );
603 rc = db->put( db, txn, &key, &data, DB_NODUPDATA );
610 rc = db->put( db, txn, &key, &data, DB_NODUPDATA );
617 key.data = ptr;
618 key.size = sizeof(ID)+1;
621 bdb_idl_cache_add_id( bdb, db, &key, e->e_id );
626 bdb_idl_cache_add_id( bdb, db, &key, e->e_id );
631 bdb_idl_cache_add_id( bdb, db, &key, e->e_id );
651 DBT key, data;
662 DBTzero(&key);
663 key.size = sizeof(ID);
664 key.ulen = key.size;
665 key.flags = DB_DBT_USERMEM;
674 key.data = &nid;
692 rc = cursor->c_get( cursor, &key, &data, DB_GET_BOTH_RANGE );
707 rc = cursor->c_get( cursor, &key, &data, DB_SET );
721 key.data = ptr;
722 key.size = sizeof(ID)+1;
725 bdb_idl_cache_del_id( bdb, db, &key, e->e_id );
730 bdb_idl_cache_del_id( bdb, db, &key, e->e_id );
735 bdb_idl_cache_del_id( bdb, db, &key, e->e_id );
754 DBT key, data;
767 DBTzero(&key);
768 key.size = sizeof(ID);
769 key.data = &idp;
770 key.ulen = sizeof(ID);
771 key.flags = DB_DBT_USERMEM;
796 rc = cursor->c_get( cursor, &key, &data, DB_GET_BOTH_RANGE );
841 DBT key, data;
848 DBTzero(&key);
849 key.size = sizeof(ID);
850 key.data = &nid;
851 key.ulen = sizeof(ID);
852 key.flags = DB_DBT_USERMEM;
865 rc = cursor->c_get( cursor, &key, &data, DB_SET );
897 DBT key, data;
903 DBTzero(&key);
904 key.size = sizeof(ID);
905 key.data = &e->e_id;
906 key.flags = DB_DBT_USERMEM;
911 rc = bdb_idl_cache_get( bdb, db, &key, NULL );
917 key.data = &id;
927 rc = cursor->c_get( cursor, &key, &data, DB_SET );
960 DBT key;
993 cx->key.data = ptr;
994 cx->key.size = sizeof(ID)+1;
998 cx->rc = bdb_idl_cache_get(cx->bdb, cx->db, &cx->key, ids);
1008 cx->rc = bdb_idl_cache_get(cx->bdb, cx->db, &cx->key, cx->tmp);
1052 cx->key.data = &cx->nid;
1053 cx->key.size = sizeof(ID);
1054 cx->rc = cx->dbc->c_get( cx->dbc, &cx->key, &cx->data, DB_SET );
1074 while ( (cx->rc = cx->dbc->c_get( cx->dbc, &cx->key, &cx->data,
1132 cx->key.data = ptr;
1133 cx->key.size = sizeof(ID)+1;
1135 bdb_idl_cache_put( cx->bdb, cx->db, &cx->key, cx->tmp, cx->rc );
1242 DBTzero(&cx.key);
1243 cx.key.ulen = sizeof(ID);
1244 cx.key.size = sizeof(ID);
1245 cx.key.flags = DB_DBT_USERMEM;
1254 cx.key.data = ptr;
1255 cx.key.size = sizeof(ID)+1;
1259 bdb_idl_cache_put( cx.bdb, cx.db, &cx.key, cx.ids, cx.rc );