Restructure Project to support DI and enable Nullity #54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull represents a restructuring of the entire project to support Dependency Injection and Nullability (ref: supabase-community/supabase-csharp#34 and #53). Unfortunately this introduces some breaking API changes.
Client
is no longer a singleton class.StatelessClient
has been removed asClient
performs the same essential functions.Table
default constructor requires reference toJsonSerializerSettings
BaseModel
now keeps track ofBaseUrl
andRequestClientOptions
. These are now used in the default (and overridable)BaseModel.Update
andBaseModel.Delete
methods (as they previously referenced the singleton).RequestException
is no longer thrown for attempting to update a record that does not exist, instead an emptyModeledResponse
is returned.In reality, not much should affect the developer as most of these classes/methods are only being referenced internally by the
Client
. The removal of the Singleton aspect may offer some design changes for those leveraging this library by itself (as opposed to using it only in supabase-csharp.)