The Build*Func parser-context helpers moved to `backend/component/parsercontext` so the runner layer can use them without an import cycle. See parsercontext.BuildGetDatabaseMetadataFunc, BuildListDatabaseNamesFunc, BuildGetLinkedDatabaseMetadataFunc. accessCheck check the access for the database. Do
( ctx context.Context, instance *store.InstanceMessage, database *store.DatabaseMessage, user *store.UserMessage, spans []*parserbase.QuerySpan, isExplain bool, statements []parserbase.Statement, requestSchema string, multiStatement bool, )
| 1501 | |
| 1502 | // accessCheck check the access for the database. Do not support cross-project resources. |
| 1503 | func (s *SQLService) accessCheck( |
| 1504 | ctx context.Context, |
| 1505 | instance *store.InstanceMessage, |
| 1506 | database *store.DatabaseMessage, |
| 1507 | user *store.UserMessage, |
| 1508 | spans []*parserbase.QuerySpan, |
| 1509 | isExplain bool, |
| 1510 | statements []parserbase.Statement, |
| 1511 | requestSchema string, |
| 1512 | multiStatement bool, |
| 1513 | ) error { |
| 1514 | return s.accessCheckWithGrantedTargets(ctx, instance, database, user, spans, isExplain, statements, nil, requestSchema, multiStatement) |
| 1515 | } |
| 1516 | |
| 1517 | // accessCheckWithGrant returns an accessCheckFunc that exempts the access |
| 1518 | // grant's target databases from IAM checks while keeping span-level checks for |
nothing calls this directly
no test coverage detected