11const std = @import ("std" );
2+ const ArrayListManaged = std .array_list .Managed ;
23
34const jetquery = @import ("../jetquery.zig" );
45const AuxiliaryQuery = @import ("Query.zig" ).AuxiliaryQuery ;
@@ -72,7 +73,7 @@ pub fn Result(AdaptedRepo: type) type {
7273
7374 const aux_type = AuxType (ResultType , aux_query .relation );
7475
75- var aux_rows = std . ArrayList (aux_type ).init (adapted_result .allocator );
76+ var aux_rows = ArrayListManaged (aux_type ).init (adapted_result .allocator );
7677 while (try aux_result .next (q )) | aux_row | {
7778 try aux_rows .append (mergeAux (
7879 aux_type ,
@@ -120,7 +121,7 @@ pub fn Result(AdaptedRepo: type) type {
120121 @field (
121122 merged_row ,
122123 init_aux_query .relation .relation_name ,
123- ) = std . ArrayList (aux_type ).init (adapted_result .allocator );
124+ ) = ArrayListManaged (aux_type ).init (adapted_result .allocator );
124125 }
125126 const aux_values = try map .aux_map .getOrPut (index );
126127 aux_values .value_ptr .* = merged_row ;
@@ -280,7 +281,7 @@ fn MergedRowType(auxiliary_queries: []const AuxiliaryQuery, ResultType: type) ty
280281 for (auxiliary_queries , 0.. ) | aux_query , index | {
281282 fields [index ] = jetquery .fields .structField (
282283 aux_query .relation .relation_name ,
283- std . ArrayList (AuxType (ResultType , aux_query .relation )),
284+ ArrayListManaged (AuxType (ResultType , aux_query .relation )),
284285 );
285286 }
286287 return jetquery .fields .structType (& fields );
@@ -341,7 +342,7 @@ fn PrimaryKey(Query: type, comptime primary_key: []const u8) type {
341342
342343fn Map (QueryType : type , MergedRow : type , comptime primary_key : []const u8 ) type {
343344 return struct {
344- id_array : std . ArrayList (PrimaryKey (QueryType , primary_key )),
345+ id_array : ArrayListManaged (PrimaryKey (QueryType , primary_key )),
345346 id_map : IdMap (QueryType , primary_key ),
346347 aux_map : std .AutoHashMap (usize , MergedRow ),
347348
@@ -350,7 +351,7 @@ fn Map(QueryType: type, MergedRow: type, comptime primary_key: []const u8) type
350351 const IM = IdMap (QueryType , primary_key );
351352 const AM = std .AutoHashMap (usize , MergedRow );
352353 return .{
353- .id_array = std . ArrayList (PK ).init (allocator ),
354+ .id_array = ArrayListManaged (PK ).init (allocator ),
354355 .id_map = IM .init (allocator ),
355356 .aux_map = AM .init (allocator ),
356357 };
0 commit comments