Skip to content

Commit eea6ff9

Browse files
committed
rename param
1 parent 05c0df2 commit eea6ff9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/schema-analyzer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,14 +166,14 @@ type AllSchemaParseOptions = {
166166
semanticTypes: boolean | SemanticTypeMap;
167167
storeValues: boolean;
168168
signal?: AbortSignal;
169-
sampleLengthLimit: number;
169+
storedValuesLengthLimit: number;
170170
};
171171
export type SchemaParseOptions = Partial<AllSchemaParseOptions>;
172172

173173
const defaultSchemaParseOptions: AllSchemaParseOptions = {
174174
semanticTypes: false,
175175
storeValues: true,
176-
sampleLengthLimit: 10000
176+
storedValuesLengthLimit: 10000
177177
};
178178

179179
/**
@@ -563,7 +563,7 @@ export class SchemaAnalyzer {
563563
}
564564

565565
type.values.pushSome(
566-
getCappedValue(type.bsonType, value, this.options.sampleLengthLimit)
566+
getCappedValue(type.bsonType, value, this.options.storedValuesLengthLimit)
567567
);
568568
}
569569
};

test/bloated.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe('bloated documents', function() {
4646
const documents = [{
4747
str: generateRandomString(20000)
4848
}];
49-
const schema = await getSchema(documents, { sampleLengthLimit: 5 });
49+
const schema = await getSchema(documents, { storedValuesLengthLimit: 5 });
5050
const stringLength = ((schema.fields[0].types[0] as PrimitiveSchemaType).values[0] as string).length;
5151
assert.ok(stringLength === 5);
5252
});

0 commit comments

Comments
 (0)