From 7a1f944779d858a6e1b80cf391e03fbbbecb4a43 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Thu, 1 Aug 2024 23:28:54 +0200 Subject: Check all the fields are captured --- src/duckdb/Result.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/duckdb/Result.zig') diff --git a/src/duckdb/Result.zig b/src/duckdb/Result.zig index 53ed351..8e06b67 100644 --- a/src/duckdb/Result.zig +++ b/src/duckdb/Result.zig @@ -35,8 +35,12 @@ pub fn Result(comptime T: type) type{ if ( state == c.DuckDBError){ return error.DuckDBError; } - self.fetchDataChunk(); + if( column_count != 0 and + column_count != self.getColumnCount() ){ + return error.QueryColumnCountCapture; + } + return self; } pub fn deinit(self: *Self) void { -- cgit v1.2.3