systemDatabaseExclusion returns the quoted, comma-joined system databases to exclude from instance discovery, per the driver's engine. StarRocks adds its read-only `sys` metadatabase (Doris has no sys), matching the parser-side system-database classification.
()
| 27 | // read-only `sys` metadatabase (Doris has no sys), matching the parser-side |
| 28 | // system-database classification. |
| 29 | func (d *Driver) systemDatabaseExclusion() string { |
| 30 | dbs := []string{"'information_schema'", "'_statistics_'"} |
| 31 | if d.dbType == storepb.Engine_STARROCKS { |
| 32 | dbs = append(dbs, "'sys'") |
| 33 | } |
| 34 | return strings.Join(dbs, ", ") |
| 35 | } |
| 36 | |
| 37 | // SyncInstance syncs the instance. |
| 38 | func (d *Driver) SyncInstance(ctx context.Context) (*db.InstanceMetadata, error) { |