Skip to content

not storing both key and record #526

@kkoch986

Description

@kkoch986

hey, so i'm having some trouble with inserts into the tree.

I run the following code:

var strata = new Strata({ directory: "./bt", leafSize: 1024, branchSize: 1024 });
strata.create((err,test) => {
	strata.mutator("rdf/3/A", (err,cursor) => {
		console.log(err);
		cursor.insert("rdf/3/A", {data:"test2"}, ~cursor.index);
		cursor.unlock(() => {
		});
	});
});

that all goes fine, but when i run:

strata.open((err,test) => {
	strata.iterator("rdf/3/A", (err,cursor) => {
		console.log(cursor.page.items);
		cursor.unlock(() => {});
	});
});

i get

[ { key: 'rdf/3/A', record: 'rdf/3/A', heft: 60 } ]

it seems like both the key and the record get set to the same thing and the data in the record is lost?

any idea whats going wrong there?

thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions