File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -447,14 +447,6 @@ protected DateTime RoundForDialect(DateTime value)
447
447
{ "locate" , new HashSet < System . Type > { typeof ( SQLiteDialect ) } } ,
448
448
{ "bit_length" , new HashSet < System . Type > { typeof ( SQLiteDialect ) } } ,
449
449
{ "extract" , new HashSet < System . Type > { typeof ( SQLiteDialect ) } } ,
450
- {
451
- "bxor" ,
452
- new HashSet < System . Type >
453
- {
454
- // Could be supported like Oracle, with a template
455
- typeof ( SQLiteDialect )
456
- }
457
- } ,
458
450
{
459
451
"nullif" ,
460
452
new HashSet < System . Type >
Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ protected virtual void RegisterFunctions()
88
88
89
89
RegisterFunction ( "round" , new StandardSQLFunction ( "round" ) ) ;
90
90
91
+ // SQLite has no built-in support of bitwise xor, but can emulate it.
92
+ // http://sqlite.1065341.n5.nabble.com/XOR-operator-td98004.html
93
+ RegisterFunction ( "bxor" , new SQLFunctionTemplate ( null , "((?1 | ?2) - (?1 & ?2))" ) ) ;
94
+
91
95
// NH-3787: SQLite requires the cast in SQL too for not defaulting to string.
92
96
RegisterFunction ( "transparentcast" , new CastFunction ( ) ) ;
93
97
}
You can’t perform that action at this time.
0 commit comments