@@ -12,45 +12,6 @@ public static void AddLatest(this IList<object> args, bool latest)
1212 if ( latest ) args . Add ( TimeSeriesArgs . LATEST ) ;
1313 }
1414
15- public static void AddRetentionTime ( this IList < object > args , long ? retentionTime )
16- {
17- if ( retentionTime . HasValue )
18- {
19- args . Add ( TimeSeriesArgs . RETENTION ) ;
20- args . Add ( retentionTime ) ;
21- }
22- }
23-
24- public static void AddChunkSize ( this IList < object > args , long ? chunkSize )
25- {
26- if ( chunkSize . HasValue )
27- {
28- args . Add ( TimeSeriesArgs . CHUNK_SIZE ) ;
29- args . Add ( chunkSize ) ;
30- }
31- }
32-
33- public static void AddLabels ( this IList < object > args , IReadOnlyCollection < TimeSeriesLabel > ? labels )
34- {
35- if ( labels != null )
36- {
37- args . Add ( TimeSeriesArgs . LABELS ) ;
38- foreach ( var label in labels )
39- {
40- args . Add ( label . Key ) ;
41- args . Add ( label . Value ) ;
42- }
43- }
44- }
45-
46- public static void AddUncompressed ( this IList < object > args , bool ? uncompressed )
47- {
48- if ( uncompressed . HasValue )
49- {
50- args . Add ( TimeSeriesArgs . UNCOMPRESSED ) ;
51- }
52- }
53-
5415 public static void AddCount ( this IList < object > args , long ? count )
5516 {
5617 if ( count . HasValue )
@@ -60,25 +21,6 @@ public static void AddCount(this IList<object> args, long? count)
6021 }
6122 }
6223
63- public static void AddDuplicatePolicy ( this IList < object > args , TsDuplicatePolicy ? policy )
64- {
65- if ( policy . HasValue )
66- {
67- args . Add ( TimeSeriesArgs . DUPLICATE_POLICY ) ;
68- args . Add ( policy . Value . AsArg ( ) ) ;
69- }
70- }
71-
72-
73- public static void AddOnDuplicate ( this IList < object > args , TsDuplicatePolicy ? policy )
74- {
75- if ( policy . HasValue )
76- {
77- args . Add ( TimeSeriesArgs . ON_DUPLICATE ) ;
78- args . Add ( policy . Value . AsArg ( ) ) ;
79- }
80- }
81-
8224 public static void AddAlign ( this IList < object > args , TimeStamp ? alignMaybe )
8325 {
8426 if ( alignMaybe is { } align )
@@ -212,53 +154,6 @@ public static void AddRule(this IList<object> args, TimeSeriesRule rule)
212154 args . Add ( rule . TimeBucket ) ;
213155 }
214156
215- public static List < object > BuildTsCreateArgs ( string key , long ? retentionTime , IReadOnlyCollection < TimeSeriesLabel > ? labels , bool ? uncompressed ,
216- long ? chunkSizeBytes , TsDuplicatePolicy ? policy )
217- {
218- var args = new List < object > { key } ;
219- args . AddRetentionTime ( retentionTime ) ;
220- args . AddChunkSize ( chunkSizeBytes ) ;
221- args . AddLabels ( labels ) ;
222- args . AddUncompressed ( uncompressed ) ;
223- args . AddDuplicatePolicy ( policy ) ;
224- return args ;
225- }
226-
227- public static List < object > BuildTsAlterArgs ( string key , long ? retentionTime , long ? chunkSizeBytes ,
228- TsDuplicatePolicy ? policy , IReadOnlyCollection < TimeSeriesLabel > ? labels )
229- {
230- var args = new List < object > { key } ;
231- args . AddRetentionTime ( retentionTime ) ;
232- args . AddChunkSize ( chunkSizeBytes ) ;
233- args . AddDuplicatePolicy ( policy ) ;
234- args . AddLabels ( labels ) ;
235- return args ;
236- }
237-
238- public static List < object > BuildTsAddArgs ( string key , TimeStamp timestamp , double value , long ? retentionTime ,
239- IReadOnlyCollection < TimeSeriesLabel > ? labels , bool ? uncompressed , long ? chunkSizeBytes , TsDuplicatePolicy ? policy )
240- {
241- var args = new List < object > { key , timestamp . Value , value } ;
242- args . AddRetentionTime ( retentionTime ) ;
243- args . AddChunkSize ( chunkSizeBytes ) ;
244- args . AddLabels ( labels ) ;
245- args . AddUncompressed ( uncompressed ) ;
246- args . AddOnDuplicate ( policy ) ;
247- return args ;
248- }
249-
250- public static List < object > BuildTsIncrDecrByArgs ( string key , double value , TimeStamp ? timestampMaybe , long ? retentionTime ,
251- IReadOnlyCollection < TimeSeriesLabel > ? labels , bool ? uncompressed , long ? chunkSizeBytes )
252- {
253- var args = new List < object > { key , value } ;
254- if ( timestampMaybe is { } timestamp ) args . AddTimeStamp ( timestamp ) ;
255- args . AddRetentionTime ( retentionTime ) ;
256- args . AddChunkSize ( chunkSizeBytes ) ;
257- if ( labels != null ) args . AddLabels ( labels ) ;
258- args . AddUncompressed ( uncompressed ) ;
259- return args ;
260- }
261-
262157 public static List < object > BuildTsDelArgs ( string key , TimeStamp fromTimeStamp , TimeStamp toTimeStamp )
263158 {
264159 var args = new List < object >
0 commit comments