File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
server/ControlPlane/Database Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -602,7 +602,7 @@ WITH matches AS (
602602 bool valid = false ;
603603 try
604604 {
605- var fields = JsonSerializer . Deserialize < string [ ] > ( Encoding . ASCII . GetString ( Base32 . ZBase32 . Decode ( continuationToken ) ) , _serializerOptions ) ;
605+ var fields = JsonSerializer . Deserialize < JsonElement [ ] > ( Encoding . ASCII . GetString ( Base32 . ZBase32 . Decode ( continuationToken ) ) , _serializerOptions ) ;
606606 if ( fields is { Length : 2 } )
607607 {
608608 if ( tags == null )
@@ -615,8 +615,8 @@ WITH matches AS (
615615 }
616616
617617 commandText . Append ( $ "(t1.created_at, t1.id) < (${ param } , ${ param + 1 } )\n ") ;
618- command . Parameters . Add ( new ( ) { Value = DateTimeOffset . Parse ( fields [ 0 ] ) , NpgsqlDbType = NpgsqlDbType . TimestampTz } ) ;
619- command . Parameters . Add ( new ( ) { Value = fields [ 1 ] , NpgsqlDbType = NpgsqlDbType . Text } ) ;
618+ command . Parameters . Add ( new ( ) { Value = new DateTimeOffset ( fields [ 0 ] . GetInt64 ( ) , TimeSpan . Zero ) , NpgsqlDbType = NpgsqlDbType . TimestampTz } ) ;
619+ command . Parameters . Add ( new ( ) { Value = fields [ 1 ] . GetString ( ) , NpgsqlDbType = NpgsqlDbType . Text } ) ;
620620 param += 2 ;
621621 valid = true ;
622622 }
@@ -687,7 +687,7 @@ LEFT JOIN tags
687687 {
688688 results . RemoveAt ( limit ) ;
689689 var last = results [ ^ 1 ] ;
690- string newToken = Base32 . ZBase32 . Encode ( Encoding . ASCII . GetBytes ( JsonSerializer . Serialize ( new [ ] { last . CreatedAt . ToString ( ) , last . Id } , _serializerOptions ) ) ) ;
690+ string newToken = Base32 . ZBase32 . Encode ( Encoding . ASCII . GetBytes ( JsonSerializer . Serialize ( new object [ ] { last . CreatedAt . UtcTicks , last . Id } , _serializerOptions ) ) ) ;
691691 return ( results , newToken ) ;
692692 }
693693
You can’t perform that action at this time.
0 commit comments