tspace-mysql 1.3.3 → 1.3.5

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.
@@ -86,13 +86,6 @@ declare class Builder extends AbstractBuilder {
86
86
  * @return {this} this
87
87
  */
88
88
  orWhereRaw(sql: string): this;
89
- /**
90
- *
91
- * @param {string} tableAndLocalKey
92
- * @param {string?} tableAndForeignKey
93
- * @return {this}
94
- */
95
- protected whereReference(tableAndLocalKey: string, tableAndForeignKey?: any): this;
96
89
  /**
97
90
  *
98
91
  * where exists
@@ -182,6 +175,13 @@ declare class Builder extends AbstractBuilder {
182
175
  * @return {this}
183
176
  */
184
177
  whereBetween(column: string, array: Array<any>): this;
178
+ /**
179
+ * where between using [value1, value2]
180
+ * @param {string} column
181
+ * @param {array} array
182
+ * @return {this}
183
+ */
184
+ orWhereBetween(column: string, array: Array<any>): this;
185
185
  /**
186
186
  * where not between using [value1, value2]
187
187
  * @param {string} column
@@ -195,12 +195,24 @@ declare class Builder extends AbstractBuilder {
195
195
  * @return {this}
196
196
  */
197
197
  whereNull(column: string): this;
198
+ /**
199
+ * where null using NULL
200
+ * @param {string} column
201
+ * @return {this}
202
+ */
203
+ orWhereNull(column: string): this;
198
204
  /**
199
205
  * where not null using NULL
200
206
  * @param {string} column
201
207
  * @return {this}
202
208
  */
203
209
  whereNotNull(column: string): this;
210
+ /**
211
+ * where not null using NULL
212
+ * @param {string} column
213
+ * @return {this}
214
+ */
215
+ orWhereNotNull(column: string): this;
204
216
  /**
205
217
  * where sensitive (uppercase, lowercase)
206
218
  * @param {string} column
@@ -217,12 +229,32 @@ declare class Builder extends AbstractBuilder {
217
229
  * @return {this}
218
230
  */
219
231
  whereStrict(column: string, operator?: any, value?: any): this;
232
+ /**
233
+ * or where sensitive (uppercase, lowercase)
234
+ * @param {string} column
235
+ * @param {string?} operator = < > != !< !>
236
+ * @param {any?} value
237
+ * @return {this}
238
+ */
239
+ orWhereSensitive(column: string, operator?: any, value?: any): this;
220
240
  /**
221
241
  * where group query
222
242
  * @param {function} callback callback query
223
243
  * @return {this}
224
244
  */
225
245
  whereQuery(callback: Function): this;
246
+ /**
247
+ * where group query
248
+ * @param {function} callback callback query
249
+ * @return {this}
250
+ */
251
+ whereGroup(callback: Function): this;
252
+ /**
253
+ * where group query
254
+ * @param {function} callback callback query
255
+ * @return {this}
256
+ */
257
+ orWhereQuery(callback: Function): this;
226
258
  /**
227
259
  * select by cases
228
260
  * @param {array} cases array object [{ when : 'id < 7' , then : 'id is than under 7'}]
@@ -540,7 +572,7 @@ declare class Builder extends AbstractBuilder {
540
572
  * exceptColumns for method except
541
573
  * @return {promise<string>} string
542
574
  */
543
- protected exceptColumns(): Promise<string>;
575
+ protected exceptColumns(): Promise<string[]>;
544
576
  /**
545
577
  * execute sql statements with raw sql query
546
578
  * @param {string} sql sql execute return data
@@ -604,9 +636,7 @@ declare class Builder extends AbstractBuilder {
604
636
  * execute data return object | null
605
637
  * @return {promise<object | null>}
606
638
  */
607
- first(): Promise<{
608
- [key: string]: any;
609
- } | null>;
639
+ first(): Promise<Record<string, any> | null>;
610
640
  /**
611
641
  *
612
642
  * execute data return object | throw rror
@@ -622,9 +652,7 @@ declare class Builder extends AbstractBuilder {
622
652
  */
623
653
  firstOrError(message: string, options?: {
624
654
  [key: string]: any;
625
- }): Promise<{
626
- [key: string]: any;
627
- }>;
655
+ }): Promise<Record<string, any>>;
628
656
  /**
629
657
  *
630
658
  * execute data return object | null
@@ -805,6 +833,14 @@ declare class Builder extends AbstractBuilder {
805
833
  * @return {promise<boolean>}
806
834
  */
807
835
  drop(): Promise<boolean>;
836
+ protected resultHandler(data: any): any;
837
+ /**
838
+ *
839
+ * @param {string} tableAndLocalKey
840
+ * @param {string?} tableAndForeignKey
841
+ * @return {this}
842
+ */
843
+ protected whereReference(tableAndLocalKey: string, tableAndForeignKey?: any): this;
808
844
  private _queryWhereIsExists;
809
845
  private _bindTableAndColumnInQueryWhere;
810
846
  private _insertNotExists;