Files
odr_console/data_registry.h
2026-05-09 18:11:22 +02:00

33 lines
910 B
C++

#pragma once
#include <string>
#include <vector>
struct sqlite3;
struct OdrRegistry {
sqlite3* db = nullptr;
};
struct RegistryRow {
std::string id;
std::string name;
std::string kind; // function | pipeline | component
std::string lang; // go | py | bash | ts | cpp
std::string domain;
std::string purity; // pure | impure
std::string signature;
std::string description;
};
bool registry_open(OdrRegistry& r, const std::string& db_path);
void registry_close(OdrRegistry& r);
// Lista las N funciones mas recientes (ORDER BY updated_at DESC).
bool registry_list_recent(OdrRegistry& r, int limit,
std::vector<RegistryRow>& out);
// FTS5 search sobre name + description + tags + signature + code.
bool registry_search(OdrRegistry& r, const std::string& query, int limit,
std::vector<RegistryRow>& out);