forked from litedb-org/LiteDB
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request litedb-org#2515 from mbdavid/no-diskqueue
Remove DiskWriterQueue to avoid adicional thread to write on disk
- Loading branch information
Showing
19 changed files
with
194 additions
and
295 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using FluentAssertions; | ||
using System; | ||
using System.IO; | ||
using System.Linq; | ||
using Xunit; | ||
|
||
namespace LiteDB.Tests.QueryTest | ||
{ | ||
public class PersonGroupByData : IDisposable | ||
{ | ||
private readonly Person[] _local; | ||
private readonly ILiteDatabase _db; | ||
private readonly ILiteCollection<Person> _collection; | ||
|
||
public PersonGroupByData() | ||
{ | ||
_local = DataGen.Person(1, 1000).ToArray(); | ||
_db = new LiteDatabase(new MemoryStream()); | ||
_collection = _db.GetCollection<Person>(); | ||
|
||
_collection.Insert(_local); | ||
_collection.EnsureIndex(x => x.Age); | ||
} | ||
|
||
public (ILiteCollection<Person>, Person[]) GetData() => (_collection, _local); | ||
|
||
public void Dispose() | ||
{ | ||
_db.Dispose(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Linq; | ||
|
||
namespace LiteDB.Tests.QueryTest | ||
{ | ||
public class PersonQueryData : IDisposable | ||
{ | ||
private readonly Person[] _local; | ||
private readonly ILiteDatabase _db; | ||
private readonly ILiteCollection<Person> _collection; | ||
|
||
public PersonQueryData() | ||
{ | ||
_local = DataGen.Person().ToArray(); | ||
|
||
_db = new LiteDatabase(":memory:"); | ||
_collection = _db.GetCollection<Person>("person"); | ||
_collection.Insert(this._local); | ||
} | ||
|
||
public (ILiteCollection<Person>, Person[]) GetData() => (_collection, _local); | ||
|
||
public void Dispose() | ||
{ | ||
_db.Dispose(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.