Skip to content

Commit 3cd8cb2

Browse files
committed
Removed todos, added to internal tracker.
1 parent 58daca9 commit 3cd8cb2

File tree

5 files changed

+0
-21
lines changed

5 files changed

+0
-21
lines changed

PowerSync/PowerSync.Common/Client/PowerSyncDatabase.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@ public PowerSyncDatabase(PowerSyncDatabaseOptions options)
120120
}
121121
else if (options.Database is SQLOpenOptions openOptions)
122122
{
123-
// TODO default to MDSQLite factory for now
124-
// Can be broken out, rename this class to Abstract
125-
// `this.openDBAdapter(options)`
126123
Database = new MDSQLiteAdapter(new MDSQLiteAdapterOptions
127124
{
128125
Name = openOptions.DbFilename,
@@ -364,7 +361,6 @@ public async Task DisconnectAndClear()
364361
await Disconnect();
365362
await WaitForReady();
366363

367-
// TODO CL bool clearLocal = options?.ClearLocal ?? false;
368364
bool clearLocal = true;
369365

370366
await Database.WriteTransaction(async tx =>
@@ -382,12 +378,6 @@ await Database.WriteTransaction(async tx =>
382378
base.Close();
383379
await WaitForReady();
384380

385-
// TODO CL
386-
// if (options.Disconnect)
387-
// {
388-
// await Disconnect();
389-
// }
390-
391381
syncStreamImplementation?.Close();
392382
BucketStorageAdapter?.Close();
393383

PowerSync/PowerSync.Common/Client/Sync/Stream/Remote.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public Remote(IPowerSyncBackendConnector connector)
5050

5151
credentials = await connector.FetchCredentials();
5252

53-
// TODO CL trailing forward slash check
5453
return credentials;
5554
}
5655

@@ -155,7 +154,6 @@ private async Task<HttpRequestMessage> BuildRequest(HttpMethod method, string pa
155154

156155
if (string.IsNullOrEmpty(credentials.Token))
157156
{
158-
// TODO CL error status code 401
159157
var error = new HttpRequestException("Not signed in");
160158
throw error;
161159
}

PowerSync/PowerSync.Common/Client/Sync/Stream/StreamingSyncImplementation.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ public StreamingSyncImplementation(StreamingSyncImplementationOptions options)
131131

132132
CancellationTokenSource = null;
133133

134-
// TODO CL throttling
135134
TriggerCrudUpload = () =>
136135
{
137136
if (!SyncStatus.Connected || SyncStatus.DataFlowStatus.Uploading)

PowerSync/PowerSync.Common/DB/Schema/Table.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ namespace PowerSync.Common.DB.Schema;
22

33
using Newtonsoft.Json;
44

5-
// TODO CL Need to port this to C#
6-
// export const InvalidSQLCharacters = /["'%,.#\s[\]]/;
7-
85
public class TableOptions(
96
Dictionary<string, List<string>>? indexes = null,
107
bool? localOnly = null,

PowerSync/PowerSync.Common/MDSQLite/MDSQLiteConnection.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ public async Task<QueryResult> ExecuteQuery(string query, object[]? parameters =
142142
var row = new Dictionary<string, object>();
143143
for (int i = 0; i < reader.FieldCount; i++)
144144
{
145-
// TODO: What should we do with null values?
146145
row[reader.GetName(i)] = reader.IsDBNull(i) ? null : reader.GetValue(i);
147146
}
148147
rows.Add(row);
@@ -164,8 +163,6 @@ public async Task<T[]> GetAll<T>(string sql, object[]? parameters = null)
164163

165164
var items = new List<T>();
166165

167-
// TODO: Improve mapping errors for when the result fields don't match the target type.
168-
// TODO: This conversion may be a performance bottleneck, it's the easiest mechamisn for getting result typing.
169166
foreach (var row in result.Rows.Array)
170167
{
171168
if (row != null)
@@ -197,8 +194,6 @@ public async Task<T[]> GetAll<T>(string sql, object[]? parameters = null)
197194
return default;
198195
}
199196

200-
// TODO: Improve mapping errors for when the result fields don't match the target type.
201-
// TODO: This conversion may be a performance bottleneck, it's the easiest mechamisn for getting result typing.
202197
string json = JsonConvert.SerializeObject(firstRow);
203198
return JsonConvert.DeserializeObject<T>(json);
204199
}

0 commit comments

Comments
 (0)