@likable-hair/svelte 3.1.16 → 3.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,8 @@ import type { JoinModifier } from "./modifiers/join";
|
|
|
2
2
|
import type { WhereModifier, WhereFilterValue } from "./modifiers/where";
|
|
3
3
|
import type { SelectModifier } from "./modifiers/select";
|
|
4
4
|
import type { FromModifier } from "./modifiers/from";
|
|
5
|
-
|
|
5
|
+
import type { OrderByModifier } from "./modifiers/orderBy";
|
|
6
|
+
export type Modifier = WhereModifier | JoinModifier | SelectModifier | FromModifier | OrderByModifier;
|
|
6
7
|
export type JsonQuery = {
|
|
7
8
|
modifiers: Modifier[];
|
|
8
9
|
};
|
|
@@ -55,6 +56,7 @@ export default class Builder {
|
|
|
55
56
|
toJson(): JsonQuery;
|
|
56
57
|
select(fields: string | string[]): this;
|
|
57
58
|
from(from: string): this;
|
|
59
|
+
orderBy(sortBy: string, sortDirection: "asc" | "desc"): this;
|
|
58
60
|
}
|
|
59
61
|
import type { JoinModifierOnClause } from "./modifiers/join";
|
|
60
62
|
declare class OnClauseBuilder {
|
|
@@ -205,6 +205,14 @@ export default class Builder {
|
|
|
205
205
|
});
|
|
206
206
|
return this;
|
|
207
207
|
}
|
|
208
|
+
orderBy(sortBy, sortDirection) {
|
|
209
|
+
this.modifiers.push({
|
|
210
|
+
method: 'orderBy',
|
|
211
|
+
sortBy: sortBy,
|
|
212
|
+
sortDirection: sortDirection
|
|
213
|
+
});
|
|
214
|
+
return this;
|
|
215
|
+
}
|
|
208
216
|
}
|
|
209
217
|
class OnClauseBuilder {
|
|
210
218
|
onClauses;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|