Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 3db90a0

Browse files
committed
2 parents f46cdf5 + 3ef9cb8 commit 3db90a0

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/ServiceStack.OrmLite.VistaDB/VistaDB4Expression.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,10 @@ protected override object VisitColumnAccessMethod(MethodCallExpression m)
216216
{
217217
if (m.Arguments.Count == 1 && m.Method.Name == "Equals")
218218
{
219-
var caller = this.Visit(m.Object);
220-
var arg = this.Visit(m.Arguments.First());
221-
222-
return new PartialSqlString(String.Format("{0} = {1}", caller, arg));
219+
return Visit(
220+
Expression.Equal(
221+
Expression.Convert(m.Object, typeof(object)),
222+
Expression.Convert(m.Arguments.First(), typeof(object))));
223223
}
224224
else
225225
{
@@ -232,4 +232,4 @@ public override SqlExpression<T> Clone()
232232
return CopyTo(new VistaDB4Expression<T>());
233233
}
234234
}
235-
}
235+
}

src/ServiceStack.OrmLite.VistaDB/VistaDB5DialectProvider .cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ public override IDbConnection CreateConnection(string connectionString, Dictiona
6767
if (!isFullConnectionString)
6868
{
6969
var filePath = connectionString;
70-
var filePathWithExt = filePath.ToLower().EndsWith(".vdb4")
70+
var filePathWithExt = filePath.ToLower().EndsWith(".vdb5")
7171
? filePath
72-
: filePath + ".vdb4";
72+
: filePath + ".vdb5";
7373

7474
var fileName = Path.GetFileName(filePathWithExt);
7575

src/ServiceStack.OrmLite.VistaDB/VistaDB5Expression.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ protected override object VisitColumnAccessMethod(MethodCallExpression m)
120120
{
121121
if (m.Arguments.Count == 1 && m.Method.Name == "Equals")
122122
{
123-
var caller = this.Visit(m.Object);
124-
var arg = this.Visit(m.Arguments.First());
125-
126-
return new PartialSqlString(String.Format("{0} = {1}", caller, arg));
123+
return Visit(
124+
Expression.Equal(
125+
Expression.Convert(m.Object, typeof(object)),
126+
Expression.Convert(m.Arguments.First(), typeof(object))));
127127
}
128128
else
129129
{
@@ -136,4 +136,4 @@ public override SqlExpression<T> Clone()
136136
return CopyTo(new VistaDB5Expression<T>());
137137
}
138138
}
139-
}
139+
}

0 commit comments

Comments
 (0)