feat: replace LiteDB with Sqlite

- Replace LiteDB database engine with Sqlite
  Note: old databases will not be deleted
- Message duplication detection improvements
- Tolerate parse errors in release builds, log them
This commit is contained in:
Dean Sheather
2024-04-19 16:57:19 +10:00
parent d7573f7bf6
commit bb6c6b0034
36 changed files with 1421 additions and 906 deletions
-11
View File
@@ -1,5 +1,3 @@
using LiteDB;
namespace ChatTwo.Code;
internal class ChatCode
@@ -21,15 +19,6 @@ internal class ChatCode
Target = SourceFrom(7);
}
[BsonCtor]
public ChatCode(ushort raw, ChatType type, ChatSource source, ChatSource target)
{
Raw = raw;
Type = type;
Source = source;
Target = target;
}
internal ChatType Parent() => Type switch
{
ChatType.Say => ChatType.Say,
+1 -1
View File
@@ -1,7 +1,7 @@
namespace ChatTwo.Code;
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1028:Enum Storage should be Int32")]
internal enum ChatType : ushort
public enum ChatType : ushort
{
Debug = 1,
Urgent = 2,