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

Commit a4b51f8

Browse files
Merge pull request #308 from angelcolmenares/master
fixed some bugs in firebirdsql
2 parents 0227142 + dc701e8 commit a4b51f8

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

src/ServiceStack.OrmLite.Firebird/FirebirdOrmLiteDialectProvider.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,11 @@ public override string ToInsertRowStatement(IDbCommand dbCommand, object objWith
233233
}
234234

235235

236-
public override string ToUpdateRowStatement(object objWithProperties, ICollection<string> updateFields)
236+
public override string ToUpdateRowStatement(object objWithProperties, ICollection<string> updateFields=null)
237237
{
238+
if (updateFields == null)
239+
updateFields = new List<string>();
240+
238241
var sqlFilter = new StringBuilder();
239242
var sql = new StringBuilder();
240243
var tableType = objWithProperties.GetType();

tests/ServiceStack.OrmLite.FirebirdTests/Expressions/OrmLiteCountTests.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,13 @@ public void CanDoCountWithInterfaceAndPredicate()
6565

6666
long Count<T>(IDbConnection db) where T : IHasId<int>, new()
6767
{
68-
T request = new T();
69-
return db.GetScalar<T, long>(e => Sql.Count(request.Id));
68+
return db.GetScalar<T, long>(e => Sql.Count(e.Id));
7069
}
7170

7271

7372
long CountByColumn<T>(IDbConnection db) where T : IHasCountColumn, new()
7473
{
75-
T request = new T();
76-
return db.GetScalar<T, long?>(e => Sql.Count(request.CountColumn)).Value;
74+
return db.GetScalar<T, long?>(e => Sql.Count(e.CountColumn)).Value;
7775
}
7876

7977

@@ -108,4 +106,4 @@ public CountTestTable() { }
108106
public int? CountColumn { get; set; }
109107
#endregion
110108
}
111-
}
109+
}

tests/ServiceStack.OrmLite.FirebirdTests/OrmLiteTestBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ public class OrmLiteTestBase
1515

1616
protected string GetFileConnectionString()
1717
{
18-
// add ormlite-tests.fdb = D:\\ormlite-tests.fdb to your firebird alias.conf
19-
return ConfigurationManager.ConnectionStrings["testDb"].ConnectionString;
18+
// add ormlite-tests.fdb = {PATH TO FDB FILE} D:\\ormlite-tests.fdb to your firebird alias.conf
19+
return "User=SYSDBA;Password=masterkey;Database=ormlite-tests.fdb;DataSource=localhost;Dialect=3;charset=ISO8859_1;MinPoolSize=0;MaxPoolSize=100;";
2020
}
2121

2222
protected void CreateNewDatabase()
@@ -38,4 +38,4 @@ public void Log(string text)
3838
Console.WriteLine(text);
3939
}
4040
}
41-
}
41+
}

0 commit comments

Comments
 (0)