Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Small code improvements #507

Merged
merged 2 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/clauses/Call.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ export class Call extends Clause {
private getSubqueryCypher(env: CypherEnvironment, importWithCypher: string | undefined): string {
// This ensures the import with is added to all the union subqueries
if (this.subquery instanceof Union || this.subquery instanceof CompositeClause) {
//TODO: try to embed the importWithCypher in the environment for a more generic solution
return this.subquery.getCypher(env, importWithCypher);
}
return this.subquery.getCypher(env);
Expand Down
2 changes: 1 addition & 1 deletion src/clauses/Foreach.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class Foreach extends Clause {
private mapClause: ForeachClauses | undefined;

constructor(variable: Variable);
/** @deprecated Use `in` and `map` instead of passing the constructor */
/** @deprecated Use `in` and `do` instead of passing the constructor */
constructor(variable: Variable, listExpr: Expr, mapClause: ForeachClauses);
constructor(variable: Variable, listExpr?: Expr, mapClause?: ForeachClauses) {
super();
Expand Down
2 changes: 1 addition & 1 deletion src/clauses/mixins/sub-clauses/WithOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export abstract class WithOrder extends Mixin {
public orderBy(...exprs: Array<[Expr, Order] | Expr | [Expr]>): this {
const normalizedExprs = exprs.map((rawExpr): [Expr, Order] => {
if (Array.isArray(rawExpr)) {
return [rawExpr[0], rawExpr[1] || DEFAULT_ORDER];
return [rawExpr[0], rawExpr[1] ?? DEFAULT_ORDER];
}
return [rawExpr, DEFAULT_ORDER];
});
Expand Down
Loading