(data?: EntityData<Entity> | readonly string[])
| 1943 | merge<const P extends string>(data: readonly NestedAutoPath<Entity, RootAlias, Context, P>[]): this; |
| 1944 | merge<F extends Field<Entity, RootAlias, Context>>(data?: EntityData<Entity> | F[]): this; |
| 1945 | merge(data?: EntityData<Entity> | readonly string[]): this { |
| 1946 | if (!this.#state.onConflict) { |
| 1947 | throw new Error('You need to call `qb.onConflict()` first to use `qb.merge()`'); |
| 1948 | } |
| 1949 | |
| 1950 | if (Array.isArray(data) && data.length === 0) { |
| 1951 | return this.ignore(); |
| 1952 | } |
| 1953 | |
| 1954 | this.#state.onConflict[this.#state.onConflict.length - 1].merge = data as |
| 1955 | | EntityData<Entity> |
| 1956 | | InternalField<Entity>[]; |
| 1957 | return this; |
| 1958 | } |
| 1959 | |
| 1960 | returning<F extends Field<Entity, RootAlias, Context>>(fields?: F | F[]): this { |
| 1961 | this.#state.returning = Utils.asArray(fields as string); |
no test coverage detected