MCPcopy Create free account
hub / github.com/zenstackhq/zenstack / $setOptions

Method $setOptions

packages/orm/src/client/client-impl.ts:449–456  ·  view source on GitHub ↗
(options: Options)

Source from the content-addressed store, hash-verified

447 }
448
449 $setOptions<Options extends ClientOptions<SchemaDef>>(options: Options): ClientContract<SchemaDef, Options> {
450 const newClient = new ClientImpl(this.schema, options as ClientOptions<SchemaDef>, this);
451 // create a new validator to have a fresh schema cache, because options may change validation settings
452 newClient.inputValidator = new InputValidator(newClient as any, {
453 enabled: newClient.$options.validateInput !== false,
454 });
455 return newClient as unknown as ClientContract<SchemaDef, Options>;
456 }
457
458 $setInputValidation(enable: boolean) {
459 const newOptions: ClientOptions<SchemaDef> = {

Callers 8

$setInputValidationMethod · 0.95
issue-2671.test.tsFile · 0.80
slicing.test.tsFile · 0.80
omit.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected