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)
447447 { "locate" , new HashSet < System . Type > { typeof ( SQLiteDialect ) } } ,
448448 { "bit_length" , new HashSet < System . Type > { typeof ( SQLiteDialect ) } } ,
449449 { "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- } ,
458450 {
459451 "nullif" ,
460452 new HashSet < System . Type >
Original file line number Diff line number Diff line change @@ -88,6 +88,10 @@ protected virtual void RegisterFunctions()
8888
8989 RegisterFunction ( "round" , new StandardSQLFunction ( "round" ) ) ;
9090
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+
9195 // NH-3787: SQLite requires the cast in SQL too for not defaulting to string.
9296 RegisterFunction ( "transparentcast" , new CastFunction ( ) ) ;
9397 }
You can’t perform that action at this time.
0 commit comments