File tree Expand file tree Collapse file tree 3 files changed +3
-10
lines changed Expand file tree Collapse file tree 3 files changed +3
-10
lines changed Original file line number Diff line number Diff line change 3
3
using System . Data . Common ;
4
4
using NHibernate . Engine ;
5
5
using NHibernate . SqlTypes ;
6
- using NHibernate . Util ;
7
6
8
7
namespace NHibernate . Type
9
8
{
@@ -57,9 +56,7 @@ private string ToCharacter(object value)
57
56
}
58
57
59
58
public override string ObjectToSQLString ( object value , Dialect . Dialect dialect )
60
- {
61
- return "'" + ToCharacter ( value ) + "'" ;
62
- }
59
+ => dialect . ToStringLiteral ( ToCharacter ( value ) , SqlType ) ;
63
60
64
61
// 6.0 TODO: rename "xml" parameter as "value": it is not a xml string. The fact it generally comes from a xml
65
62
// attribute value is irrelevant to the method behavior.
Original file line number Diff line number Diff line change @@ -171,8 +171,6 @@ public override object FromStringValue(string xml)
171
171
}
172
172
173
173
public override string ObjectToSQLString ( object value , Dialect . Dialect dialect )
174
- {
175
- return '\' ' + GetValue ( value ) . ToString ( ) + '\' ' ;
176
- }
174
+ => dialect . ToStringLiteral ( GetValue ( value ) . ToString ( ) , SqlType ) ;
177
175
}
178
176
}
Original file line number Diff line number Diff line change @@ -84,9 +84,7 @@ public override object FromStringValue(string xml)
84
84
}
85
85
86
86
public string ObjectToSQLString ( object value , Dialect . Dialect dialect )
87
- {
88
- return "'" + ( ( Uri ) value ) . OriginalString + "'" ;
89
- }
87
+ => dialect . ToStringLiteral ( ( ( Uri ) value ) . OriginalString , SqlType ) ;
90
88
91
89
/// <inheritdoc />
92
90
public override object Assemble ( object cached , ISessionImplementor session , object owner )
You can’t perform that action at this time.
0 commit comments