newBaseImportOptions returns a prepopulated ImportOptions struct with values that are database wide.
(config *DbConfig, serverless bool)
| 1155 | |
| 1156 | // newBaseImportOptions returns a prepopulated ImportOptions struct with values that are database wide. |
| 1157 | func newBaseImportOptions(config *DbConfig, serverless bool) *db.ImportOptions { |
| 1158 | // Identify import options |
| 1159 | importOptions := &db.ImportOptions{ |
| 1160 | BackupOldRev: base.ValDefault(config.ImportBackupOldRev, false), |
| 1161 | } |
| 1162 | |
| 1163 | if config.ImportPartitions == nil { |
| 1164 | importOptions.ImportPartitions = base.GetDefaultImportPartitions(serverless) |
| 1165 | } else { |
| 1166 | importOptions.ImportPartitions = *config.ImportPartitions |
| 1167 | } |
| 1168 | return importOptions |
| 1169 | |
| 1170 | } |
| 1171 | |
| 1172 | func dbcOptionsFromConfig(ctx context.Context, sc *ServerContext, config *DbConfig, dbName string) (db.DatabaseContextOptions, error) { |
| 1173 |
no test coverage detected