#!/bin/bash sqlite3 $(dirname $(realpath $0))/rag.db ".load $WORKSPACE/deps/sqlite3/sqlite3/vec0" \ < $(dirname $(realpath $0))/schema.sql sqlite3 $(dirname $(realpath $0))/rag.db ".load $WORKSPACE/deps/sqlite3/sqlite3/vec0" <"}'); -- Insert a test chunk (requires source_id) INSERT INTO rag_chunks (chunk_id, doc_id, source_id, chunk_index, body, title) VALUES ('test:doc1#0', 'test:doc1', 1, 0, 'This is a test chunk about MySQL databases and full-text search capabilities.', 'Test Document About MySQL'); -- Insert FTS entry INSERT INTO rag_fts_chunks (chunk_id, title, body) VALUES ('test:doc1#0', 'Test Document About MySQL', 'This is a test chunk about MySQL databases and full-text search capabilities.'); -- Verify the data SELECT 'Documents:' AS table_name, COUNT(*) AS count FROM rag_documents UNION ALL SELECT 'Chunks:', COUNT(*) FROM rag_chunks UNION ALL SELECT 'FTS entries:', COUNT(*) FROM rag_fts_chunks; EOF