11using Postgrest . Models ;
22using Postgrest . Responses ;
33using Supabase . Core . Interfaces ;
4+ using System ;
45using System . Collections . Generic ;
6+ using System . Linq . Expressions ;
57using System . Threading ;
68using System . Threading . Tasks ;
79
810namespace Postgrest . Interfaces
911{
10- public interface IPostgrestTable < T > : IGettableHeaders
11- where T : BaseModel , new ( )
12- {
13- string BaseUrl { get ; }
14- string TableName { get ; }
12+ public interface IPostgrestTable < T > : IGettableHeaders
13+ where T : BaseModel , new ( )
14+ {
15+ string BaseUrl { get ; }
16+ string TableName { get ; }
1517
16- Table < T > And ( List < QueryFilter > filters ) ;
17- void Clear ( ) ;
18- Table < T > Columns ( string [ ] columns ) ;
19- Task < int > Count ( Constants . CountType type , CancellationToken cancellationToken = default ) ;
20- Task Delete ( QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
21- Task < ModeledResponse < T > > Delete ( T model , QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
22- Table < T > Filter ( string columnName , Constants . Operator op , object criterion ) ;
23- Task < ModeledResponse < T > > Get ( CancellationToken cancellationToken = default ) ;
24- Task < ModeledResponse < T > > Insert ( ICollection < T > models , QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
25- Task < ModeledResponse < T > > Insert ( T model , QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
26- Table < T > Limit ( int limit , string ? foreignTableName = null ) ;
27- Table < T > Match ( Dictionary < string , string > query ) ;
28- Table < T > Match ( T model ) ;
29- Table < T > Not ( QueryFilter filter ) ;
30- Table < T > Not ( string columnName , Constants . Operator op , Dictionary < string , object > criteria ) ;
31- Table < T > Not ( string columnName , Constants . Operator op , List < object > criteria ) ;
32- Table < T > Not ( string columnName , Constants . Operator op , string criterion ) ;
33- Table < T > Offset ( int offset , string ? foreignTableName = null ) ;
34- Table < T > OnConflict ( string columnName ) ;
35- Table < T > Or ( List < QueryFilter > filters ) ;
36- Table < T > Order ( string column , Constants . Ordering ordering , Constants . NullPosition nullPosition = Constants . NullPosition . First ) ;
37- Table < T > Order ( string foreignTable , string column , Constants . Ordering ordering , Constants . NullPosition nullPosition = Constants . NullPosition . First ) ;
38- Table < T > Range ( int from ) ;
39- Table < T > Range ( int from , int to ) ;
40- Table < T > Select ( string columnQuery ) ;
41- Task < T ? > Single ( CancellationToken cancellationToken = default ) ;
42- Task < ModeledResponse < T > > Update ( T model , QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
43- Task < ModeledResponse < T > > Upsert ( ICollection < T > model , QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
44- Task < ModeledResponse < T > > Upsert ( T model , QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
45- }
18+ Table < T > And ( List < QueryFilter > filters ) ;
19+ void Clear ( ) ;
20+ Table < T > Columns ( string [ ] columns ) ;
21+ Table < T > Columns ( Expression < Func < T , object [ ] > > predicate ) ;
22+ Task < int > Count ( Constants . CountType type , CancellationToken cancellationToken = default ) ;
23+ Task Delete ( QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
24+ Task < ModeledResponse < T > > Delete ( T model , QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
25+ Table < T > Filter ( string columnName , Constants . Operator op , object criterion ) ;
26+ Table < T > Filter ( Expression < Func < T , object > > predicate , Constants . Operator op , object criterion ) ;
27+ Task < ModeledResponse < T > > Get ( CancellationToken cancellationToken = default ) ;
28+ Task < ModeledResponse < T > > Insert ( ICollection < T > models , QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
29+ Task < ModeledResponse < T > > Insert ( T model , QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
30+ Table < T > Limit ( int limit , string ? foreignTableName = null ) ;
31+ Table < T > Match ( Dictionary < string , string > query ) ;
32+ Table < T > Match ( T model ) ;
33+ Table < T > Not ( QueryFilter filter ) ;
34+ Table < T > Not ( string columnName , Constants . Operator op , Dictionary < string , object > criteria ) ;
35+ Table < T > Not ( string columnName , Constants . Operator op , List < object > criteria ) ;
36+ Table < T > Not ( string columnName , Constants . Operator op , string criterion ) ;
37+ Table < T > Offset ( int offset , string ? foreignTableName = null ) ;
38+ Table < T > OnConflict ( string columnName ) ;
39+ Table < T > OnConflict ( Expression < Func < T , object > > predicate ) ;
40+ Table < T > Or ( List < QueryFilter > filters ) ;
41+ Table < T > Order ( string column , Constants . Ordering ordering , Constants . NullPosition nullPosition = Constants . NullPosition . First ) ;
42+ Table < T > Order ( Expression < Func < T , object > > predicate , Constants . Ordering ordering , Constants . NullPosition nullPosition = Constants . NullPosition . First ) ;
43+ Table < T > Order ( string foreignTable , string column , Constants . Ordering ordering , Constants . NullPosition nullPosition = Constants . NullPosition . First ) ;
44+ Table < T > Range ( int from ) ;
45+ Table < T > Range ( int from , int to ) ;
46+ Table < T > Select ( string columnQuery ) ;
47+ Table < T > Select ( Expression < Func < T , object [ ] > > predicate ) ;
48+ Table < T > Where ( Expression < Func < T , bool > > predicate ) ;
49+ Task < T ? > Single ( CancellationToken cancellationToken = default ) ;
50+ Table < T > Set ( Expression < Func < T , KeyValuePair < object , object > > > keyValuePairExpression ) ;
51+ Task < ModeledResponse < T > > Update ( QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
52+ Task < ModeledResponse < T > > Update ( T model , QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
53+ Task < ModeledResponse < T > > Upsert ( ICollection < T > model , QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
54+ Task < ModeledResponse < T > > Upsert ( T model , QueryOptions ? options = null , CancellationToken cancellationToken = default ) ;
55+ }
4656}
0 commit comments