|
|
@@ -62,6 +62,15 @@ func Lint(ruleStr string) error {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
+func HasRule(dbSchema string, scope string, domainName string, i *infrastructure.Infrastructure) (bool, error) {
|
|
|
+ dbExecutor := i.DBExecutor()
|
|
|
+
|
|
|
+ return database.CheckExist(dbExecutor, &sql.CheckExistExecuteParams{
|
|
|
+ TableName: domain.TableName(dbSchema, &ValueObject{}),
|
|
|
+ Conditions: sql.NewConditions().Equal(ColumnScope, scope).Equal(ColumnDomainName, domainName),
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
func FormConditions(dbSchema string, scope string, domainName string, i *infrastructure.Infrastructure) (*sql.Conditions, error) {
|
|
|
dbExecutor := i.DBExecutor()
|
|
|
|