@axiosleo/orm-mysql 0.9.3 → 0.9.4

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.
package/bin/orm-mysql.js CHANGED
@@ -9,7 +9,7 @@ const app = new App({
9
9
  name: 'MySQL ORM CLI',
10
10
  desc: 'migrate, model, seed, etc.',
11
11
  bin: 'orm-mysql',
12
- version: '0.9.3',
12
+ version: '0.9.4',
13
13
  commands_dir: path.join(__dirname, '../commands'),
14
14
  });
15
15
 
package/index.d.ts CHANGED
@@ -53,9 +53,12 @@ export type QueryOperatorBaseOptions = {
53
53
  queryHandler?: QueryHandler;
54
54
  };
55
55
 
56
+ export type AttrSubQuery = () => Query;
57
+ export type Attr = string | AttrSubQuery;
58
+
56
59
  export type QueryOperatorOptions = QueryOperatorBaseOptions & {
57
60
  conditions: WhereOptions[];
58
- attrs?: string[] | null;
61
+ attrs?: Attr[] | null;
59
62
  orders: OrderByOptions[];
60
63
  pageLimit?: number;
61
64
  pageOffset?: number;
@@ -92,7 +95,7 @@ export declare class Query {
92
95
 
93
96
  andWhere(key: string | null, opt: OptType, value: ConditionValueType | WhereOptions[]): this;
94
97
 
95
- attr(...attr: string[]): this;
98
+ attr(...attr: Attr[]): this;
96
99
 
97
100
  orderBy(sortField: string, sortOrder: 'asc' | 'desc'): this;
98
101
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axiosleo/orm-mysql",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "MySQL ORM tool",
5
5
  "keywords": [
6
6
  "mysql",