@@ -32,12 +32,12 @@ type SqlExecutor struct {
3232 // 是否最终为空结果, 用于node中中断数据获取
3333 WithEmptyResult bool
3434
35- accessVerify bool
35+ noAccessVerify bool
3636
3737 access * db.Access
3838}
3939
40- func New (ctx context.Context , accessVerify bool , role string , access * db.Access ) (executor.QueryExecutor , error ) {
40+ func New (ctx context.Context , noAccessVerify bool , role string , access * db.Access ) (executor.QueryExecutor , error ) {
4141
4242 return & SqlExecutor {
4343 ctx : ctx ,
@@ -47,7 +47,7 @@ func New(ctx context.Context, accessVerify bool, role string, access *db.Access)
4747 Order : "" ,
4848 Group : "" ,
4949 WithEmptyResult : false ,
50- accessVerify : accessVerify ,
50+ noAccessVerify : noAccessVerify ,
5151 access : access ,
5252 }, nil
5353}
@@ -67,7 +67,7 @@ func (e *SqlExecutor) ParseCondition(conditions model.MapStrAny, accessVerify bo
6767 case strings .HasSuffix (key , consts .OpRegexp ):
6868 e .Where = append (e .Where , []any {key [0 : len (key )- 1 ], consts .SqlRegexp , gconv .String (condition )})
6969
70- case key == "@raw" && ! accessVerify :
70+ case key == consts . Raw && ! accessVerify :
7171 e .accessCondition = condition .(model.Map )
7272
7373 default :
@@ -79,7 +79,7 @@ func (e *SqlExecutor) ParseCondition(conditions model.MapStrAny, accessVerify bo
7979 return nil
8080 }
8181
82- if ! e . accessVerify { // 可任意字段搜索
82+ if e . noAccessVerify { // 可任意字段搜索
8383 return nil
8484 }
8585
@@ -302,7 +302,7 @@ func (e *SqlExecutor) column() []string {
302302 }
303303
304304 // 过滤可访问字段
305- if ! e . accessVerify || lo .Contains (outFields , dbStyle (e .ctx , tableName , fieldName )) ||
305+ if e . noAccessVerify || lo .Contains (outFields , dbStyle (e .ctx , tableName , fieldName )) ||
306306 len (outFields ) == 0 /* 数据库中未设置, 则看成全部可访问 */ {
307307 fields = append (fields , column )
308308 }
0 commit comments