chore: auto-commit (5 archivos)
- playground/tables/CMakeLists.txt - playground/tables/data_table.cpp - playground/tables/self_test.cpp - playground/tables/tql_duckdb.cpp - playground/tables/tql_duckdb.h Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// tql_duckdb: ejecuta SQL DuckDB sobre TableInputs in-memory.
|
||||
// Solo se compila si FN_TQL_DUCKDB esta definido. Adapter opcional para
|
||||
// tql_to_sql emit -> execute. Ver issue 0080.
|
||||
#pragma once
|
||||
|
||||
#ifdef FN_TQL_DUCKDB
|
||||
|
||||
#include "data_table_logic.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace tql_duckdb {
|
||||
|
||||
struct Result {
|
||||
data_table::StageOutput out;
|
||||
std::string error; // non-empty si fallo
|
||||
int row_count = 0;
|
||||
double duration_ms = 0.0;
|
||||
};
|
||||
|
||||
// Impure: abre DuckDB in-memory, registra tablas como CREATE TABLE + INSERT,
|
||||
// prepara sql con `?` placeholders bound a `params`, materializa resultado.
|
||||
Result execute(const std::string& sql,
|
||||
const std::vector<std::string>& params,
|
||||
const std::vector<data_table::TableInput>& tables);
|
||||
|
||||
} // namespace tql_duckdb
|
||||
|
||||
#endif // FN_TQL_DUCKDB
|
||||
Reference in New Issue
Block a user