Skip to content
# Function: optimizeUnusedLeftJoins()

optimizeUnusedLeftJoins(query, schemaInfo): SelectQuery

Defined in: packages/core/src/transformers/OptimizeUnusedLeftJoins.ts:317

Removes LEFT JOIN clauses from the provided query when AST references prove the join target is unused and schema metadata certifies the join column is unique.

Parameters ​

query ​

SelectQuery

schemaInfo ​

SchemaInfo

Returns ​

SelectQuery

Released under the MIT License.