# Functions
No description provided by the author
BuildInCondition 函數用於生成 SQL 的 IN 條件子句,可用於多種查詢中。 它接收欄位名稱和對應的值陣列,返回構建的條件子句和對應的參數陣列。.
BuildOrder 函數根據提供的排序欄位和排序順序陣列生成 SQL 的 ORDER BY 子句。 它接收兩個字串陣列:sort 包含排序欄位名,order 包含對應的排序順序(如 "ASC" 或 "DESC")。 返回構建好的 ORDER BY 子句字串。.
No description provided by the author
No description provided by the author
No description provided by the author
GetInsertFields 函數用於從任何給定的結構體動態生成 INSERT 語句所需的欄位名稱、佔位符和參數值。 此函數接受任意類型的 data 參數,返回三個切片:欄位名稱、佔位符和參數值。.
GetNonNullFields 函數用於檢查結構體中的非 nil 指針欄位,並為這些欄位生成 SQL 更新語句的 SET 子句部分。 此函數接受任意類型的 data 參數,返回兩個切片:一個包含 SET 子句的字符串,另一個包含相應的參數值。.
GetScanFields 函數用於從任何指定的結構體動態生成用於資料庫查詢結果的掃描接收器。 此函數接收任意類型的 data 參數,返回一個包含每個欄位接收器的切片。.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author