MCPcopy Index your code
hub / github.com/mikro-orm/mikro-orm / createDefaultState

Method createDefaultState

packages/sql/src/query/QueryBuilder.ts:604–628  ·  view source on GitHub ↗

@internal

()

Source from the content-addressed store, hash-verified

602
603 /** @internal */
604 static createDefaultState<T extends object>(): QBState<T> {
605 return {
606 aliasCounter: 0,
607 explicitAlias: false,
608 populateHintFinalized: false,
609 joins: {},
610 cond: {},
611 orderBy: [],
612 groupBy: [],
613 having: {},
614 comments: [],
615 hintComments: [],
616 subQueries: {},
617 aliases: {},
618 tptAlias: {},
619 ctes: [],
620 tptJoinsApplied: false,
621 autoJoinedPaths: [],
622 populate: [],
623 populateMap: {},
624 flags: new Set([QueryFlag.CONVERT_CUSTOM_TYPES]),
625 finalized: false,
626 joinedProps: new Map(),
627 };
628 }
629
630 get mainAlias(): Alias<Entity> {
631 this.ensureFromClause();

Callers 2

QueryBuilderClass · 0.80
cloneMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected