@@ -9,18 +9,18 @@ internal unsafe class VectorDataWriterBase(IntPtr vector, void* vectorData, Duck
9
9
private unsafe ulong * validity ;
10
10
internal IntPtr Vector { get ; } = vector ;
11
11
12
- public unsafe void AppendNull ( ulong rowIndex )
12
+ public unsafe void AppendNull ( int rowIndex )
13
13
{
14
14
if ( validity == default )
15
15
{
16
16
NativeMethods . Vectors . DuckDBVectorEnsureValidityWritable ( Vector ) ;
17
17
validity = NativeMethods . Vectors . DuckDBVectorGetValidity ( Vector ) ;
18
18
}
19
19
20
- NativeMethods . ValidityMask . DuckDBValiditySetRowValidity ( validity , rowIndex , false ) ;
20
+ NativeMethods . ValidityMask . DuckDBValiditySetRowValidity ( validity , ( ulong ) rowIndex , false ) ;
21
21
}
22
22
23
- public unsafe void AppendValue < T > ( T value , ulong rowIndex )
23
+ public unsafe void AppendValue < T > ( T value , int rowIndex )
24
24
{
25
25
if ( value == null )
26
26
{
@@ -60,40 +60,40 @@ public unsafe void AppendValue<T>(T value, ulong rowIndex)
60
60
} ;
61
61
}
62
62
63
- internal virtual bool AppendBool ( bool value , ulong rowIndex ) => ThrowException < bool > ( ) ;
63
+ internal virtual bool AppendBool ( bool value , int rowIndex ) => ThrowException < bool > ( ) ;
64
64
65
- internal virtual bool AppendDecimal ( decimal value , ulong rowIndex ) => ThrowException < decimal > ( ) ;
65
+ internal virtual bool AppendDecimal ( decimal value , int rowIndex ) => ThrowException < decimal > ( ) ;
66
66
67
- internal virtual bool AppendTimeSpan ( TimeSpan value , ulong rowIndex ) => ThrowException < TimeSpan > ( ) ;
67
+ internal virtual bool AppendTimeSpan ( TimeSpan value , int rowIndex ) => ThrowException < TimeSpan > ( ) ;
68
68
69
- internal virtual bool AppendGuid ( Guid value , ulong rowIndex ) => ThrowException < Guid > ( ) ;
69
+ internal virtual bool AppendGuid ( Guid value , int rowIndex ) => ThrowException < Guid > ( ) ;
70
70
71
- internal virtual bool AppendBlob ( byte * value , int length , ulong rowIndex ) => ThrowException < byte [ ] > ( ) ;
71
+ internal virtual bool AppendBlob ( byte * value , int length , int rowIndex ) => ThrowException < byte [ ] > ( ) ;
72
72
73
- internal virtual bool AppendString ( string value , ulong rowIndex ) => ThrowException < string > ( ) ;
73
+ internal virtual bool AppendString ( string value , int rowIndex ) => ThrowException < string > ( ) ;
74
74
75
- internal virtual bool AppendDateTime ( DateTime value , ulong rowIndex ) => ThrowException < DateTime > ( ) ;
75
+ internal virtual bool AppendDateTime ( DateTime value , int rowIndex ) => ThrowException < DateTime > ( ) ;
76
76
77
77
#if NET6_0_OR_GREATER
78
- internal virtual bool AppendDateOnly ( DateOnly value , ulong rowIndex ) => ThrowException < DateOnly > ( ) ;
78
+ internal virtual bool AppendDateOnly ( DateOnly value , int rowIndex ) => ThrowException < DateOnly > ( ) ;
79
79
80
- internal virtual bool AppendTimeOnly ( TimeOnly value , ulong rowIndex ) => ThrowException < TimeOnly > ( ) ;
80
+ internal virtual bool AppendTimeOnly ( TimeOnly value , int rowIndex ) => ThrowException < TimeOnly > ( ) ;
81
81
#endif
82
82
83
- internal virtual bool AppendDateOnly ( DuckDBDateOnly value , ulong rowIndex ) => ThrowException < DuckDBDateOnly > ( ) ;
83
+ internal virtual bool AppendDateOnly ( DuckDBDateOnly value , int rowIndex ) => ThrowException < DuckDBDateOnly > ( ) ;
84
84
85
- internal virtual bool AppendTimeOnly ( DuckDBTimeOnly value , ulong rowIndex ) => ThrowException < DuckDBTimeOnly > ( ) ;
85
+ internal virtual bool AppendTimeOnly ( DuckDBTimeOnly value , int rowIndex ) => ThrowException < DuckDBTimeOnly > ( ) ;
86
86
87
- internal virtual bool AppendNumeric < T > ( T value , ulong rowIndex ) where T : unmanaged => ThrowException < T > ( ) ;
87
+ internal virtual bool AppendNumeric < T > ( T value , int rowIndex ) where T : unmanaged => ThrowException < T > ( ) ;
88
88
89
- internal virtual bool AppendBigInteger ( BigInteger value , ulong rowIndex ) => ThrowException < BigInteger > ( ) ;
89
+ internal virtual bool AppendBigInteger ( BigInteger value , int rowIndex ) => ThrowException < BigInteger > ( ) ;
90
90
91
91
private bool ThrowException < T > ( )
92
92
{
93
93
throw new InvalidOperationException ( $ "Cannot write { typeof ( T ) . Name } to { columnType } column") ;
94
94
}
95
95
96
- internal unsafe bool AppendValueInternal < T > ( T value , ulong rowIndex ) where T : unmanaged
96
+ internal unsafe bool AppendValueInternal < T > ( T value , int rowIndex ) where T : unmanaged
97
97
{
98
98
( ( T * ) vectorData ) [ rowIndex ] = value ;
99
99
return true ;
0 commit comments