Fix failing integration tests in folderimpl package when running on Spanner. (#102602)

* Fix failing integration tests in folderimpl package when running on Spanner.

* Add comments.
This commit is contained in:
Peter Štibraný
2025-03-21 14:18:22 +01:00
committed by GitHub
parent 3339251b57
commit ea89499209
3 changed files with 7 additions and 6 deletions
+3 -3
View File
@@ -607,9 +607,9 @@ func (ss *FolderStoreImpl) GetDescendants(ctx context.Context, orgID int64, ance
}
func getFullpathSQL(dialect migrator.Dialect) string {
escaped := "\\/"
if dialect.DriverName() == migrator.MySQL {
escaped = "\\\\/"
escaped := `\/`
if dialect.DriverName() == migrator.MySQL || dialect.DriverName() == migrator.Spanner {
escaped = `\\/`
}
concatCols := make([]string, 0, folder.MaxNestedFolderDepth)
concatCols = append(concatCols, fmt.Sprintf("COALESCE(REPLACE(f0.title, '/', '%s'), '')", escaped))