Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
6f9bfee
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 8, 2026
2398483
resolve review comments
idseefeld Jan 9, 2026
1390acf
replace more hard coded strings
idseefeld Jan 9, 2026
9bc68dd
fix test
idseefeld Jan 9, 2026
e0eebc7
merge branch v173/20453-dto-constants
idseefeld Jan 9, 2026
9cd2b09
Merge branch 'main' into v173/20453-dto-constants
idseefeld Jan 9, 2026
82aaf6c
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 9, 2026
48a2534
merge previous changes
idseefeld Jan 9, 2026
d2547ef
fix review comments
idseefeld Jan 9, 2026
b90c59f
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 9, 2026
e7abd2e
merge updates
idseefeld Jan 9, 2026
944e16d
fix database schema
idseefeld Jan 10, 2026
d782932
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 10, 2026
fd32385
Merge branch 'v173/20453-21303-nameof-in-raw-SQL' into v173/20453-fix…
idseefeld Jan 10, 2026
86bce0a
fix namespaces and column names
idseefeld Jan 10, 2026
bb0dcd4
fix database schema
idseefeld Jan 10, 2026
74c992e
fix merge
idseefeld Jan 10, 2026
9a22870
Merge branch 'v173/20453-21303-nameof-in-raw-SQL' into v173/20453-fix…
idseefeld Jan 10, 2026
44e3d8d
fix database schema and ResultColumn reference names
idseefeld Jan 10, 2026
8118a3f
Update src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeAllowed…
idseefeld Jan 10, 2026
7e64ceb
add comment from review
idseefeld Jan 10, 2026
fd6465d
fix two reference column names
idseefeld Jan 10, 2026
0e4a963
fix breaking change
idseefeld Jan 10, 2026
327f8dc
fix typo
idseefeld Jan 10, 2026
f54d895
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 10, 2026
0e99b7c
Merge branch 'v173/20453-21303-nameof-in-raw-SQL' into v173/20453-fix…
idseefeld Jan 10, 2026
adc2b8f
fix quoted column name
idseefeld Jan 11, 2026
857fae7
handle shortend foreign keys (PostgreSQL limits
idseefeld Jan 11, 2026
cf51dab
fix method
idseefeld Jan 11, 2026
87078bd
handle foreign key limitations
idseefeld Jan 11, 2026
34118b6
Merge branch 'main' into v173/20453-dto-constants
idseefeld Jan 12, 2026
8e021c3
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 12, 2026
a171ac6
fix merge
idseefeld Jan 12, 2026
afeab7f
Remove unnecessary attributes
idseefeld Jan 12, 2026
22f1c01
Merge branch 'main' into v173/20453-dto-constants
idseefeld Jan 13, 2026
143adb9
mark 2 unsused DTO classes as obsolete
idseefeld Jan 13, 2026
8804ba1
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 13, 2026
b4c2283
Merge branch 'v173/20453-21303-nameof-in-raw-SQL' into v173/20453-fix…
idseefeld Jan 13, 2026
e88b7fb
Merge branch 'main' into v173/20453-dto-constants
idseefeld Jan 13, 2026
b992e74
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 13, 2026
27566f5
Merge branch 'v173/20453-21303-nameof-in-raw-SQL' into v173/20453-fix…
idseefeld Jan 13, 2026
58b38a0
reverted change of class UnionHelperDto adding [Column("...")] attrib…
idseefeld Jan 13, 2026
f9edc2b
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 13, 2026
e2d191f
Merge branch 'v173/20453-21303-nameof-in-raw-SQL' into v173/20453-fix…
idseefeld Jan 13, 2026
f6bbd7a
Merge branch 'main' into v173/20453-dto-constants
idseefeld Jan 13, 2026
9605da6
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 13, 2026
fdc9f6b
Merge branch 'v173/20453-21303-nameof-in-raw-SQL' into v173/20453-fix…
idseefeld Jan 13, 2026
b116aeb
optimize DatabaseSchemaCreator.ValidateDbConstraints a little.
idseefeld Jan 13, 2026
9bfb5d5
Add constraint name truncation via SqlSyntax provider
idseefeld Jan 13, 2026
d6ef92d
Merge branch 'main' into v173/20453-dto-constants
idseefeld Jan 14, 2026
de4fae0
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 14, 2026
4bf7525
Merge branch 'v173/20453-21303-nameof-in-raw-SQL' into v173/20453-fix…
idseefeld Jan 14, 2026
9aafbd3
fix WhereIn
idseefeld Jan 14, 2026
5d47a41
Merge branch 'main' into v173/20453-dto-constants
idseefeld Jan 15, 2026
8f6e406
replace nameof reference names,
idseefeld Jan 15, 2026
81384f7
Merge branch 'main' into v173/20453-dto-constants
idseefeld Jan 15, 2026
c744b27
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 15, 2026
15c612f
Merge branch 'main' into v173/20453-dto-constants
idseefeld Jan 15, 2026
e207e5c
Merge branch 'v173/20453-dto-constants' into v173/20453-21303-nameof-…
idseefeld Jan 15, 2026
a022331
Merge branch 'v173/20453-21303-nameof-in-raw-SQL' into v173/20453-fix…
idseefeld Jan 15, 2026
9ac8ece
Merge branch 'main' into v173/20453-21303-nameof-in-raw-SQL
idseefeld Jan 15, 2026
57cbf95
Merge branch 'v173/20453-21303-nameof-in-raw-SQL' into v173/20453-fix…
idseefeld Jan 15, 2026
308053b
Merge branch 'main' into v173/20453-21303-nameof-in-raw-SQL
idseefeld Jan 15, 2026
eabb76e
Merge branch 'v173/20453-21303-nameof-in-raw-SQL' into v173/20453-fix…
idseefeld Jan 15, 2026
7b7d784
use NPoco dto instead of raw sql,
idseefeld Jan 15, 2026
893be1c
merge
idseefeld Jan 15, 2026
edc2222
merge branch "main" into "v173/20453-fix-more-sql-syntax-issues"
idseefeld Jan 16, 2026
142a80a
merge branch "main" into "v173/20453-21418-NPoco-DTO-Features-vs-RAW-…
idseefeld Jan 16, 2026
a11d18f
reduce complexity
idseefeld Jan 16, 2026
99cd3f3
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 16, 2026
28cbaaf
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 16, 2026
5582bf8
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 16, 2026
55a545d
remove currently unsused extensions to ISqlSyntax
idseefeld Jan 16, 2026
e543bed
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' of http…
idseefeld Jan 16, 2026
41d0e1b
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 16, 2026
d373046
Merge branch 'main' into v173/20453-fix-more-sql-syntax-issues
idseefeld Jan 16, 2026
74d6487
add missing methods to ISqlSyntaxProvider and SqlSyntaxProviderBase
idseefeld Jan 16, 2026
18caa70
add another missing methods to ISqlSyntaxProvider and SqlSyntaxProvid…
idseefeld Jan 16, 2026
c494311
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 16, 2026
21aae61
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 17, 2026
551b63e
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 17, 2026
1511121
fix Copilot review comments and build errors
idseefeld Jan 17, 2026
6826857
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 17, 2026
de57ed2
fix Copilot review comments and build errors
idseefeld Jan 17, 2026
b530f4b
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 17, 2026
688fa69
update
idseefeld Jan 17, 2026
98203e0
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 17, 2026
a72f83d
update ISqlSyntaxProvider and SqlSyntaxProviderBase
idseefeld Jan 17, 2026
2f65c03
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 17, 2026
55e6b64
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 19, 2026
bcfd60c
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 19, 2026
4935008
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 19, 2026
6bb0f27
ensure GetPagedDescendants returns ordered by path entities as default
idseefeld Jan 19, 2026
56f7ac6
Use Database.FirstOrDefault instead of Database.ExecuteScalar
idseefeld Jan 19, 2026
921ed41
quote raw sql names,
idseefeld Jan 19, 2026
995ccb7
merge branch "v173/20453-21446-21448-21451-raw-sql-issues" into "v173…
idseefeld Jan 19, 2026
e831357
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 19, 2026
0ef3756
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 20, 2026
80fc2c9
resolve review comments
idseefeld Jan 20, 2026
271b6eb
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 20, 2026
6579d85
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 20, 2026
8b9593b
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 20, 2026
5de9e1d
Merge branch 'v173/20453-21446-21448-21451-raw-sql-issues' into v173/…
idseefeld Jan 20, 2026
6d4cd60
update method name
idseefeld Jan 20, 2026
2772637
Merge branch 'v173/20453-21446-21448-21451-raw-sql-issues' into v173/…
idseefeld Jan 20, 2026
ff33413
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 20, 2026
a40f07f
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 20, 2026
e23367c
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 20, 2026
b7e2db7
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 20, 2026
aaa69b2
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 20, 2026
2ad8b28
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 20, 2026
e64bae3
refactor for codescene
idseefeld Jan 20, 2026
87f157c
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 21, 2026
84462c7
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 21, 2026
dd2b060
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 21, 2026
78a78c9
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 21, 2026
5bf7806
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 21, 2026
32be1d4
merge branch "v173/20453-21446-21448-21451-raw-sql-issues" into "v173…
idseefeld Jan 21, 2026
5d1786a
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 21, 2026
64b9fce
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 21, 2026
2c37361
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 21, 2026
16ec734
merge branch "v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar"…
idseefeld Jan 21, 2026
0e73b1d
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 21, 2026
6d5af07
fix review comments
idseefeld Jan 21, 2026
92e380a
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 21, 2026
e05364a
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 21, 2026
6ff951a
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 21, 2026
5d9228e
merge branch "v173/20453-21446-21448-21451-raw-sql-issues" into "v173…
idseefeld Jan 21, 2026
e9c70cf
fix DatabaseDataCreator
idseefeld Jan 21, 2026
f3f4672
Update src/Umbraco.Infrastructure/Persistence/SqlSyntax/ISqlSyntaxPro…
idseefeld Jan 21, 2026
d440d07
Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCr…
idseefeld Jan 21, 2026
6b9bd09
Update src/Umbraco.PublishedCache.HybridCache/Persistence/DatabaseCac…
idseefeld Jan 21, 2026
fe670e6
Update src/Umbraco.Infrastructure/Persistence/SqlSyntax/ISqlSyntaxPro…
idseefeld Jan 21, 2026
8c5db51
fix Copilot comment
idseefeld Jan 21, 2026
1eb4632
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' of http…
idseefeld Jan 21, 2026
7761320
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 22, 2026
a533ae8
fix wrong Copilot suggestion
idseefeld Jan 22, 2026
aca3c17
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 22, 2026
fffbd5d
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 22, 2026
184ae6b
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 22, 2026
1e446ed
Merge branch 'v173/20453-21446-21448-21451-raw-sql-issues' into v173/…
idseefeld Jan 22, 2026
d13162b
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 22, 2026
ede7117
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 22, 2026
2630c96
quote more column names
idseefeld Jan 22, 2026
cfdeb17
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 22, 2026
a8ecb87
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 22, 2026
902b4c3
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 22, 2026
87a0c69
Merge branch 'v173/20453-21446-21448-21451-raw-sql-issues' into v173/…
idseefeld Jan 22, 2026
5261165
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 22, 2026
38b7aea
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 22, 2026
700e2d6
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 22, 2026
0b1f8fb
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 22, 2026
5657969
Merge branch 'v173/20453-21446-21448-21451-raw-sql-issues' into v173/…
idseefeld Jan 22, 2026
1d7d515
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 23, 2026
9e9f5a1
resolve review
idseefeld Jan 23, 2026
09224d0
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 23, 2026
95f8a01
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 23, 2026
5bfe808
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 23, 2026
d4a47a8
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 23, 2026
4695f91
Merge branch 'v173/20453-21446-21448-21451-raw-sql-issues' into v173/…
idseefeld Jan 23, 2026
24bf8f7
add new test
idseefeld Jan 23, 2026
0270617
fix new test
idseefeld Jan 23, 2026
9bfd2f5
Merge branch 'main' into v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL
idseefeld Jan 23, 2026
9a60cdd
Apply suggestions from code review
AndyButland Jan 23, 2026
cbb7549
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 23, 2026
147d491
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 23, 2026
880d2f5
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 23, 2026
920bbfc
Merge branch 'v173/20453-21446-21448-21451-raw-sql-issues' into v173/…
idseefeld Jan 23, 2026
6eb9304
extend NPocoSqlExtension methods, fix one test
idseefeld Jan 23, 2026
b526273
fix and refactor DatabaseDataCreator
idseefeld Jan 23, 2026
5bec162
code clean up, align formating
idseefeld Jan 23, 2026
349acef
clean up #pragma
idseefeld Jan 23, 2026
5931181
merge
idseefeld Jan 23, 2026
cf01cd0
synced interface and base class
idseefeld Jan 23, 2026
9266045
Revert "synced interface and base class". For an interface's default …
AndyButland Jan 24, 2026
7abc4ec
Fixed remaining code warnings in DatabaseSchemaCreator.
AndyButland Jan 24, 2026
a950184
Merge branch 'v173/20453-21418-NPoco-DTO-Features-vs-RAW-SQL' into v1…
idseefeld Jan 24, 2026
1356fa8
Merge branch 'main' into v173/20453-21446-Ensure-descendent-entities-…
idseefeld Jan 24, 2026
feec0d6
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 24, 2026
750c26e
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 24, 2026
9b72771
Merge branch 'v173/20453-21446-21448-21451-raw-sql-issues' into v173/…
idseefeld Jan 24, 2026
1119b13
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 24, 2026
31e5da2
Merge branch 'v173/20453-21446-21448-21451-21513-21516-DatabaseDataCr…
idseefeld Jan 24, 2026
e790acd
follow Cotpilot's review suggestion
idseefeld Jan 24, 2026
dae013e
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 24, 2026
ea7bbe7
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 24, 2026
fe0e458
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 24, 2026
f7fb28f
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 24, 2026
f719c04
Merge branch 'v173/20453-21446-21448-21451-21513-21516-DatabaseDataCr…
idseefeld Jan 24, 2026
2fff203
revert implementation and fix test
idseefeld Jan 26, 2026
bc5d671
Merge branch 'main' into v173/20453-21446-Ensure-descendent-entities-…
idseefeld Jan 26, 2026
4bcc727
use default
idseefeld Jan 26, 2026
d9f0d0b
Merge branch 'v173/20453-21446-Ensure-descendent-entities-ordered-by-…
idseefeld Jan 26, 2026
07bdaac
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 26, 2026
6424372
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 26, 2026
beed229
Merge branch 'v173/20453-21446-21448-21451-21513-21516-DatabaseDataCr…
idseefeld Jan 26, 2026
e8114df
Merge branch 'main' into v173/20453-21446-21448-FirstOrDefault-vs-Exe…
idseefeld Jan 26, 2026
adaa35f
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 26, 2026
3b4e738
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 26, 2026
a1bd8a7
Merge branch 'v173/20453-21446-21448-21451-21513-21516-DatabaseDataCr…
idseefeld Jan 26, 2026
e841727
Merge branch 'main' into v173/20453-21446-21448-FirstOrDefault-vs-Exe…
idseefeld Jan 26, 2026
ed6fd4a
Merge branch 'main' into v173/20453-21446-21448-FirstOrDefault-vs-Exe…
idseefeld Jan 26, 2026
14e43c7
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 26, 2026
f2f6e58
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 26, 2026
e8aaf70
Merge branch 'v173/20453-21446-21448-21451-21513-21516-DatabaseDataCr…
idseefeld Jan 26, 2026
1c8bf59
Merge branch 'main' into v173/20453-21446-21448-FirstOrDefault-vs-Exe…
idseefeld Jan 26, 2026
5ba3998
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 26, 2026
51996d3
Merge branch 'main' into v173/20453-21446-21448-FirstOrDefault-vs-Exe…
idseefeld Jan 27, 2026
4fbf72d
Merge branch 'main' into v173/20453-21446-21448-FirstOrDefault-vs-Exe…
idseefeld Jan 27, 2026
60f14b1
Merge branch 'v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScalar'…
idseefeld Jan 27, 2026
dbd81de
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 27, 2026
016c553
Merge branch 'v173/20453-21446-21448-21451-21513-21516-DatabaseDataCr…
idseefeld Jan 27, 2026
adaef92
Squash merged "v173/20453-21446-21448-FirstOrDefault-vs-ExecuteScala…
idseefeld Jan 27, 2026
f127fc1
Merge branch 'v173/21448-FirstOrDefault-vs-ExecuteScalar' into v173/2…
idseefeld Jan 27, 2026
bc903fc
squash merge "v173/20453-21446-21448-21451-raw-sql-issues" into "v173…
idseefeld Jan 27, 2026
bc5f7cf
resolce Copilot code review comments
idseefeld Jan 27, 2026
3f8a9e8
Merge branch 'main' into v173/21448-FirstOrDefault-vs-ExecuteScalar
idseefeld Jan 27, 2026
d2dbda8
squash merge v173/21448-FirstOrDefault-vs-ExecuteScalar into v173/214…
idseefeld Jan 27, 2026
0d73d4c
Merge branch 'v173/21451-raw-sql-issues' into v173/20453-21446-21448-…
idseefeld Jan 27, 2026
7c46845
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 27, 2026
f38d533
Merge branch 'v173/20453-21446-21448-21451-21513-21516-DatabaseDataCr…
idseefeld Jan 27, 2026
0f1e5ca
revert to ExecuteScalar<string>
idseefeld Jan 28, 2026
d9ba957
Merge branch 'main' into v173/21448-FirstOrDefault-vs-ExecuteScalar
idseefeld Jan 28, 2026
4a8a6d2
revert to Database.ExecuteScalar<string>
idseefeld Jan 28, 2026
5920259
Merge branch 'v173/21448-FirstOrDefault-vs-ExecuteScalar' into v173/2…
idseefeld Jan 28, 2026
67c243c
Merge branch 'v173/21451-raw-sql-issues' into v173/20453-21446-21448-…
idseefeld Jan 28, 2026
9fc010a
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 28, 2026
dc11844
Merge branch 'v173/20453-21446-21448-21451-21513-21516-DatabaseDataCr…
idseefeld Jan 28, 2026
cecb562
Merge branch 'main' into v173/21448-FirstOrDefault-vs-ExecuteScalar
idseefeld Jan 28, 2026
284bcb1
revert .FirstOrDefault<long>(query) and its async variant to .Execute…
idseefeld Jan 29, 2026
b472a41
Merge branch 'v173/21448-FirstOrDefault-vs-ExecuteScalar' of https://…
idseefeld Jan 29, 2026
db240c3
Merge branch 'v173/21448-FirstOrDefault-vs-ExecuteScalar' into v173/2…
idseefeld Jan 29, 2026
383080c
Merge branch 'v173/21451-raw-sql-issues' into v173/20453-21446-21448-…
idseefeld Jan 29, 2026
d3d3619
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 29, 2026
2162708
Merge branch 'v173/20453-21446-21448-21451-21513-21516-DatabaseDataCr…
idseefeld Jan 29, 2026
028b07f
quote table, column and alias names with SqlSyntaxProvider methods in…
idseefeld Jan 29, 2026
888ccaf
Merge branch 'v173/21451-quote-raw-sql-names-with-SqlSyntaxProvider-m…
idseefeld Jan 29, 2026
1a042c8
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 29, 2026
4735615
Merge branch 'v173/20453-21446-21448-21451-21513-21516-DatabaseDataCr…
idseefeld Jan 29, 2026
e406c32
refactoring private methods into new file as internal methods,
idseefeld Jan 29, 2026
8344bfb
refactor GetAlias method
idseefeld Jan 29, 2026
6511dea
Double check the change
idseefeld Jan 29, 2026
2f1250b
Merge branch 'v173/21451-quote-raw-sql-names-with-SqlSyntaxProvider-m…
idseefeld Jan 29, 2026
a2be346
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 29, 2026
2768b61
Merge branch 'v173/20453-21446-21448-21451-21513-21516-DatabaseDataCr…
idseefeld Jan 29, 2026
12072a1
improve code health
idseefeld Jan 30, 2026
95388db
change new static classes into public static partial class NPocoSqlEx…
idseefeld Jan 30, 2026
8f6349c
Merge branch 'v173/21451-quote-raw-sql-names-with-SqlSyntaxProvider-m…
idseefeld Jan 30, 2026
cbe9123
Merge branch 'v173/20453-21446-21448-21451-21513-more-NPocoSqlExtensi…
idseefeld Jan 30, 2026
b31a94a
Merge branch 'v173/20453-21446-21448-21451-21513-21516-DatabaseDataCr…
idseefeld Jan 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,302 changes: 1,006 additions & 1,296 deletions src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;
using NPoco;
using Umbraco.Cms.Core.Events;
using Umbraco.Cms.Core.Notifications;
using Umbraco.Cms.Infrastructure.Persistence;

namespace Umbraco.Cms.Infrastructure.Migrations.Notifications
{
public sealed class DatabaseSchemaInitializedNotification : StatefulNotification
{
public DatabaseSchemaInitializedNotification(IUmbracoDatabase database)
{
Database = database;
}

public IUmbracoDatabase Database { get; }
}
}
189 changes: 125 additions & 64 deletions src/Umbraco.Infrastructure/Persistence/NPocoSqlExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ public static Sql<ISqlContext> WhereClosure<TDto>(this Sql<ISqlContext> sql, Exp
return sql.Where<TDto>(predicate, alias).Append(")");
}

// moved to NPocoSqlWhereExtensions.cs
// can be removed after code review of PR #21577 or when in main branch
//public static Sql<ISqlContext> WhereParam<TDto>(this Sql<ISqlContext> sql, Expression<Func<TDto, object?>> field, string param)
//{
// string s = $"{sql.GetColumns(columnExpressions: [field], withAlias: false).FirstOrDefault()} = {param}";
// return sql.Where(s, []);
//}

/// <summary>
/// Appends a WHERE clause to the Sql statement.
/// </summary>
Expand Down Expand Up @@ -87,7 +95,25 @@ public static Sql<ISqlContext> Where<TDto1, TDto2, TDto3>(this Sql<ISqlContext>
/// <returns>The Sql statement.</returns>
public static Sql<ISqlContext> WhereIn<TDto>(this Sql<ISqlContext> sql, Expression<Func<TDto, object?>> field, IEnumerable? values)
{
if (values == null)
{
return sql;
}

var fieldName = sql.SqlContext.SqlSyntax.GetFieldName(field);

string[] stringValues = [.. values.OfType<string>()]; // This is necessary to avoid failing attempting to convert to string[] when values contains non-string types
if (stringValues.Length > 0)
{
Attempt<string[]> attempt = values.TryConvertTo<string[]>();
if (attempt.Success)
{
values = attempt.Result?.Select(v => v?.ToLower());
sql.Where($"LOWER({fieldName}) IN (@values)", new { values });
return sql;
}
}

sql.Where($"{fieldName} IN (@values)", new { values });
return sql;
}
Expand Down Expand Up @@ -788,6 +814,28 @@ public static Sql<ISqlContext> SelectMax<TDto>(this Sql<ISqlContext> sql, Expres
return sql.Select($"COALESCE(MAX ({sql.SqlContext.SqlSyntax.GetFieldName(field)}), {coalesceValue})");
}

/// <summary>
/// Adds a SQL SELECT statement to retrieve the maximum value of the specified field from the table associated
/// with the specified DTO type.
/// </summary>
/// <typeparam name="TDto">The type of the Data Transfer Object (DTO) that represents the table from which the maximum value will be
/// selected.</typeparam>
/// <param name="sql">The SQL query builder to which the SELECT statement will be appended. Cannot be <see langword="null"/>.</param>
/// <param name="field">An expression specifying the field for which the maximum value will be calculated. Cannot be <see
/// langword="null"/>.</param>
/// <param name="coalesceValue">COALESCE string value.</param>
/// <returns>A modified SQL query builder that includes the SELECT statement for the maximum value of the specified
/// field or the coalesceValue.</returns>
// moved to NPocoSqlSelectExtensions.cs
// can be removed after code review of PR #21577 or when in main branch
//public static Sql<ISqlContext> SelectMax<TDto>(this Sql<ISqlContext> sql, Expression<Func<TDto, object?>> field, string coalesceValue)
//{
// ArgumentNullException.ThrowIfNull(sql);
// ArgumentNullException.ThrowIfNull(field);

// return sql.Select($"COALESCE(MAX {sql.SqlContext.SqlSyntax.GetFieldName(field)}), '{coalesceValue}')");
//}

/// <summary>
/// Adds a SQL SELECT statement to retrieve the sum of the values of the specified field from the table associated
/// with the specified DTO type.
Expand Down Expand Up @@ -1483,20 +1531,22 @@ public static Sql<ISqlContext> AppendForUpdateHint(this Sql<ISqlContext> sql)

#region Aliasing

internal static string GetAliasedField(this Sql<ISqlContext> sql, string field)
{
// get alias, if aliased
//
// regex looks for pattern "([\w+].[\w+]) AS ([\w+])" ie "(field) AS (alias)"
// and, if found & a group's field matches the field name, returns the alias
//
// so... if query contains "[umbracoNode].[nodeId] AS [umbracoNode__nodeId]"
// then GetAliased for "[umbracoNode].[nodeId]" returns "[umbracoNode__nodeId]"

MatchCollection matches = sql.SqlContext.SqlSyntax.AliasRegex.Matches(sql.SQL);
Match? match = matches.Cast<Match>().FirstOrDefault(m => m.Groups[1].Value.InvariantEquals(field));
return match == null ? field : match.Groups[2].Value;
}
// moved to NPocoSqlExtensionsInternal.cs
// can be removed after code review of PR #21577 or when in main branch
//internal static string GetAliasedField(this Sql<ISqlContext> sql, string field)
//{
// // get alias, if aliased
// //
// // regex looks for pattern "([\w+].[\w+]) AS ([\w+])" ie "(field) AS (alias)"
// // and, if found & a group's field matches the field name, returns the alias
// //
// // so... if query contains "[umbracoNode].[nodeId] AS [umbracoNode__nodeId]"
// // then GetAliased for "[umbracoNode].[nodeId]" returns "[umbracoNode__nodeId]"

// MatchCollection matches = sql.SqlContext.SqlSyntax.AliasRegex.Matches(sql.SQL);
// Match? match = matches.Cast<Match>().FirstOrDefault(m => m.Groups[1].Value.InvariantEquals(field));
// return match == null ? field : match.Groups[2].Value;
//}

#endregion

Expand All @@ -1505,55 +1555,64 @@ internal static string GetAliasedField(this Sql<ISqlContext> sql, string field)
public static Sql<ISqlContext> AppendSubQuery(this Sql<ISqlContext> sql, Sql<ISqlContext> subQuery, string alias)
{
// Append the subquery as a derived table with an alias
sql.Append("(").Append(subQuery.SQL, subQuery.Arguments).Append($") AS {alias}");
sql.Append("(").Append(subQuery.SQL, subQuery.Arguments).Append($") AS {sql.SqlContext.SqlSyntax.GetQuotedName(alias)}");

return sql;
}

private static string[] GetColumns<TDto>(this Sql<ISqlContext> sql, string? tableAlias = null, string? referenceName = null, Expression<Func<TDto, object?>>[]? columnExpressions = null, bool withAlias = true, bool forInsert = false)
{
PocoData? pd = sql.SqlContext.PocoDataFactory.ForType(typeof(TDto));
var tableName = tableAlias ?? pd.TableInfo.TableName;
var queryColumns = pd.QueryColumns.ToList();

Dictionary<string, string>? aliases = null;

if (columnExpressions != null && columnExpressions.Length > 0)
{
var names = columnExpressions.Select(x =>
{
(MemberInfo member, var alias) = ExpressionHelper.FindProperty(x);
var field = member as PropertyInfo;
var fieldName = field?.GetColumnName();
if (alias != null && fieldName is not null)
{
aliases ??= new Dictionary<string, string>();
aliases[fieldName] = alias;
}
return fieldName;
}).ToArray();

//only get the columns that exist in the selected names
queryColumns = queryColumns.Where(x => names.Contains(x.Key)).ToList();

//ensure the order of the columns in the expressions is the order in the result
queryColumns.Sort((a, b) => names.IndexOf(a.Key).CompareTo(names.IndexOf(b.Key)));
}

string? GetAlias(PocoColumn column)
{
if (aliases != null && aliases.TryGetValue(column.ColumnName, out var alias))
{
return alias;
}

return withAlias ? (string.IsNullOrEmpty(column.ColumnAlias) ? column.MemberInfoKey : column.ColumnAlias) : null;
}

return queryColumns
.Select(x => sql.SqlContext.SqlSyntax.GetColumn(sql.SqlContext.DatabaseType, tableName, x.Value.ColumnName, GetAlias(x.Value)!, referenceName, forInsert: forInsert))
.ToArray();
}
// moved to NPocoSqlExtensionsInternal.cs
// can be removed after code review of PR #21577 or when in main branch
//private static string[] GetColumns<TDto>(this Sql<ISqlContext> sql, string? tableAlias = null, string? referenceName = null, Expression<Func<TDto, object?>>[]? columnExpressions = null, bool withAlias = true, bool forInsert = false)
//{
// PocoData? pd = sql.SqlContext.PocoDataFactory.ForType(typeof(TDto));
// var tableName = tableAlias ?? pd.TableInfo.TableName;
// var queryColumns = pd.QueryColumns.ToList();

// Dictionary<string, string>? aliases = null;

// if (columnExpressions != null && columnExpressions.Length > 0)
// {
// var names = columnExpressions.Select(x =>
// {
// (MemberInfo member, var alias) = ExpressionHelper.FindProperty(x);
// var field = member as PropertyInfo;
// var fieldName = field?.GetColumnName();
// if (alias != null && fieldName is not null)
// {
// aliases ??= new Dictionary<string, string>();
// aliases[fieldName] = alias;
// }
// return fieldName;
// }).ToArray();

// //only get the columns that exist in the selected names
// queryColumns = queryColumns.Where(x => names.Contains(x.Key)).ToList();

// //ensure the order of the columns in the expressions is the order in the result
// queryColumns.Sort((a, b) => names.IndexOf(a.Key).CompareTo(names.IndexOf(b.Key)));
// }

// string? GetAlias(PocoColumn column)
// {
// if (aliases != null && aliases.TryGetValue(column.ColumnName, out var alias))
// {
// return alias;
// }

// if ((column.MemberInfoKey.InvariantEquals("uniqueid") && !column.MemberInfoKey.Equals("uniqueId"))
// || (column.MemberInfoKey.InvariantEquals("languageid") && !column.MemberInfoKey.Equals("languageId")))
// {
// return withAlias ? (string.IsNullOrEmpty(column.ColumnAlias) ? column.ColumnName
// : column.ColumnAlias) : null;
// }

// return withAlias ? (string.IsNullOrEmpty(column.ColumnAlias) ? column.MemberInfoKey : column.ColumnAlias) : null;
// }

// return queryColumns
// .Select(x => sql.SqlContext.SqlSyntax.GetColumn(sql.SqlContext.DatabaseType, tableName, x.Value.ColumnName, GetAlias(x.Value)!, referenceName, forInsert: forInsert))
// .ToArray();
//}

public static string GetTableName(this Type type)
{
Expand All @@ -1564,11 +1623,13 @@ public static string GetTableName(this Type type)
return string.IsNullOrWhiteSpace(attr?.Value) ? string.Empty : attr.Value;
}

private static string GetColumnName(this PropertyInfo column)
{
ColumnAttribute? attr = column.FirstAttribute<ColumnAttribute>();
return string.IsNullOrWhiteSpace(attr?.Name) ? column.Name : attr.Name;
}
// moved to SqlSyntaxExtensions.cs
// can be removed after code review of PR #21577 or when in main branch
//private static string GetColumnName(this PropertyInfo column)
//{
// ColumnAttribute? attr = column.FirstAttribute<ColumnAttribute>();
// return string.IsNullOrWhiteSpace(attr?.Name) ? column.Name : attr.Name;
//}

public static string ToText(this Sql sql)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
using System.Linq.Expressions;
using System.Reflection;
using System.Text.RegularExpressions;
using NPoco;
using Umbraco.Cms.Core;
using Umbraco.Cms.Infrastructure.Persistence;

namespace Umbraco.Extensions
{
public static partial class NPocoSqlExtensions
{
internal static string GetAliasedField(this Sql<ISqlContext> sql, string field)
{
// get alias, if aliased
//
// regex looks for pattern "([\w+].[\w+]) AS ([\w+])" ie "(field) AS (alias)"
// and, if found & a group's field matches the field name, returns the alias
//
// so... if query contains "[umbracoNode].[nodeId] AS [umbracoNode__nodeId]"
// then GetAliased for "[umbracoNode].[nodeId]" returns "[umbracoNode__nodeId]"

MatchCollection matches = sql.SqlContext.SqlSyntax.AliasRegex.Matches(sql.SQL);
Match? match = matches.Cast<Match>().FirstOrDefault(m => m.Groups[1].Value.InvariantEquals(field));
return match == null ? field : match.Groups[2].Value;
}

internal static string[] GetColumns<TDto>(this Sql<ISqlContext> sql, string? tableAlias = null, string? referenceName = null, Expression<Func<TDto, object?>>[]? columnExpressions = null, bool withAlias = true, bool forInsert = false)
{
PocoData? pd = sql.SqlContext.PocoDataFactory.ForType(typeof(TDto));
var tableName = tableAlias ?? pd.TableInfo.TableName;
var queryColumns = pd.QueryColumns.ToList();

Dictionary<string, string>? aliases = null;

if (columnExpressions != null && columnExpressions.Length > 0)
{
var names = columnExpressions.Select(x =>
{
(MemberInfo member, var alias) = ExpressionHelper.FindProperty(x);
var field = member as PropertyInfo;
var fieldName = field?.GetColumnName();
if (alias != null && fieldName is not null)
{
aliases ??= new Dictionary<string, string>();
aliases[fieldName] = alias;
}
return fieldName;
}).ToArray();

//only get the columns that exist in the selected names
queryColumns = queryColumns.Where(x => names.Contains(x.Key)).ToList();

//ensure the order of the columns in the expressions is the order in the result
queryColumns.Sort((a, b) => names.IndexOf(a.Key).CompareTo(names.IndexOf(b.Key)));
}

string? GetAlias(PocoColumn column)
{
if (aliases != null && aliases.TryGetValue(column.ColumnName, out var alias))
{
return alias;
}

return withAlias ? (string.IsNullOrEmpty(column.ColumnAlias) ? column.MemberInfoKey : column.ColumnAlias) : null;
}

return queryColumns
.Select(x => sql.SqlContext.SqlSyntax.GetColumn(
sql.SqlContext.DatabaseType,
tableName,
x.Value.ColumnName,
GetAlias(x.Value),
referenceName,
forInsert: forInsert))
.ToArray();
}
}
}
37 changes: 37 additions & 0 deletions src/Umbraco.Infrastructure/Persistence/NPocoSqlSelectExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using System.Collections;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using NPoco;
using Umbraco.Cms.Core;
using Umbraco.Cms.Infrastructure.Persistence;
using Umbraco.Cms.Infrastructure.Persistence.Querying;
using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax;

namespace Umbraco.Extensions
{
public static partial class NPocoSqlExtensions
{
/// <summary>
/// Adds a SQL SELECT statement to retrieve the maximum value of the specified field from the table associated
/// with the specified DTO type.
/// </summary>
/// <typeparam name="TDto">The type of the Data Transfer Object (DTO) that represents the table from which the maximum value will be
/// selected.</typeparam>
/// <param name="sql">The SQL query builder to which the SELECT statement will be appended. Cannot be <see langword="null"/>.</param>
/// <param name="field">An expression specifying the field for which the maximum value will be calculated. Cannot be <see
/// langword="null"/>.</param>
/// <param name="coalesceValue">COALESCE string value.</param>
/// <returns>A modified SQL query builder that includes the SELECT statement for the maximum value of the specified
/// field or the coalesceValue.</returns>
public static Sql<ISqlContext> SelectMax<TDto>(this Sql<ISqlContext> sql, Expression<Func<TDto, object?>> field, string coalesceValue)
{
ArgumentNullException.ThrowIfNull(sql);
ArgumentNullException.ThrowIfNull(field);

return sql.Select($"COALESCE(MAX {sql.SqlContext.SqlSyntax.GetFieldName(field)}), '{coalesceValue}')");
}

}
}
22 changes: 22 additions & 0 deletions src/Umbraco.Infrastructure/Persistence/NPocoSqlWhereExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System.Collections;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using NPoco;
using Umbraco.Cms.Core;
using Umbraco.Cms.Infrastructure.Persistence;
using Umbraco.Cms.Infrastructure.Persistence.Querying;
using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax;

namespace Umbraco.Extensions
{
public static partial class NPocoSqlExtensions
{
public static Sql<ISqlContext> WhereParam<TDto>(this Sql<ISqlContext> sql, Expression<Func<TDto, object?>> field, string param)
{
string s = $"{sql.GetColumns(columnExpressions: [field], withAlias: false).FirstOrDefault()} = {param}";
return sql.Where(s, []);
}
}
}
Loading
Loading