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ý authored and GitHub committed 2025-03-21 14:18:22 +01:00
1 parent 3339251b57
commit ea89499209
3 files changed
+7 -6

No files matched your search

+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))