yjp преди 1 година
родител
ревизия
fceb00dbfc
променени са 1 файла, в които са добавени 21 реда и са изтрити 0 реда
  1. 21 0
      framework/core/infrastructure/database/clause/common.go

+ 21 - 0
framework/core/infrastructure/database/clause/common.go

@@ -0,0 +1,21 @@
+package clause
+
+type CommonClause struct {
+	clause string
+	args   []any
+}
+
+func NewCommonClause(clause string, args ...any) CommonClause {
+	return CommonClause{
+		clause: clause,
+		args:   args,
+	}
+}
+
+func (clause CommonClause) Clause() (string, error) {
+	return string(clause.clause + "\n"), nil
+}
+
+func (clause CommonClause) Args() []any {
+	return clause.args
+}