Update type definitions #2
This commit is contained in:
Vendored
+1
-1
@@ -830,7 +830,7 @@ export type ServerQueryParamsJoin<Table extends string = string, Field extends o
|
||||
joinType: "INNER JOIN" | "JOIN" | "LEFT JOIN" | "RIGHT JOIN";
|
||||
alias?: string;
|
||||
tableName: Table;
|
||||
match?: ServerQueryParamsJoinMatchObject<Field> | ServerQueryParamsJoinMatchObject<Field>[];
|
||||
match?: ServerQueryParamsJoinMatchObject<Field> | (ServerQueryParamsJoinMatchObject<Field> | undefined)[];
|
||||
selectFields?: (keyof Field | SelectFieldObject<Field>)[];
|
||||
omitFields?: (keyof Field | {
|
||||
field: keyof Field;
|
||||
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
import { isUndefined } from "lodash";
|
||||
import _, { isUndefined } from "lodash";
|
||||
import sqlGenGrabConcatStr from "./sql-generator-grab-concat-str";
|
||||
import sqlGenGenJoinStr from "./sql-generator-gen-join-str";
|
||||
import sqlGenGrabSelectFieldSQL from "./sql-generator-grab-select-field-sql";
|
||||
@@ -162,6 +162,7 @@ export default function sqlGenGenQueryStr(params) {
|
||||
if (Array.isArray(join.match)) {
|
||||
return ("(" +
|
||||
join.match
|
||||
.filter((mtch) => !_.isUndefined(mtch))
|
||||
.map((mtch) => {
|
||||
const { str, values } = sqlGenGenJoinStr({
|
||||
mtch,
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/bun-mariadb",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"description": "Schema-driven MariaDB manager for Bun",
|
||||
"author": "Benjamin Toby",
|
||||
"license": "MIT",
|
||||
|
||||
+1
-1
@@ -916,7 +916,7 @@ export type ServerQueryParamsJoin<
|
||||
tableName: Table;
|
||||
match?:
|
||||
| ServerQueryParamsJoinMatchObject<Field>
|
||||
| ServerQueryParamsJoinMatchObject<Field>[];
|
||||
| (ServerQueryParamsJoinMatchObject<Field> | undefined)[];
|
||||
selectFields?: (keyof Field | SelectFieldObject<Field>)[];
|
||||
omitFields?: (
|
||||
| keyof Field
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { isUndefined } from "lodash";
|
||||
import _, { isUndefined } from "lodash";
|
||||
import type { ServerQueryParam, TableSelectFieldsObject } from "../types";
|
||||
import sqlGenGrabConcatStr from "./sql-generator-grab-concat-str";
|
||||
import sqlGenGenJoinStr from "./sql-generator-gen-join-str";
|
||||
@@ -195,6 +195,7 @@ export default function sqlGenGenQueryStr<
|
||||
return (
|
||||
"(" +
|
||||
join.match
|
||||
.filter((mtch) => !_.isUndefined(mtch))
|
||||
.map((mtch) => {
|
||||
const { str, values } =
|
||||
sqlGenGenJoinStr({
|
||||
|
||||
Reference in New Issue
Block a user