Skip to main content
Glama
by 8b-is
backup.sql4.29 kB
-- Smart Tree Test SQL Backup File -- Testing SQL syntax highlighting and parsing -- Database: smart_tree_test -- Version: 4.8.8 -- Generated: 2025-01-13 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; -- -------------------------------------------------------- -- -- Table structure for `files` -- CREATE TABLE IF NOT EXISTS `files` ( `id` int(11) NOT NULL AUTO_INCREMENT, `path` varchar(512) NOT NULL, `name` varchar(255) NOT NULL, `type` enum('file','directory','symlink') DEFAULT 'file', `size` bigint(20) DEFAULT 0, `permissions` varchar(10) DEFAULT '-rw-r--r--', `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `wave_frequency` float DEFAULT 44.1, `compression_ratio` int(11) DEFAULT 1, PRIMARY KEY (`id`), KEY `idx_path` (`path`), KEY `idx_type` (`type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `files` -- INSERT INTO `files` (`path`, `name`, `type`, `size`, `permissions`, `wave_frequency`, `compression_ratio`) VALUES ('/ayeverse/mem8', 'mem8', 'directory', 0, 'drwxr-xr-x', 44100, 973), ('/ayeverse/mem8/core.rs', 'core.rs', 'file', 8192, '-rw-r--r--', 44100, 100), ('/ayeverse/smart-tree', 'smart-tree', 'directory', 0, 'drwxr-xr-x', 200, 80), ('/ayeverse/smart-tree/main.rs', 'main.rs', 'file', 16384, '-rw-r--r--', 60, 70), ('/ayeverse/docs', 'docs', 'directory', 0, 'drwxr-xr-x', 2, 1); -- -------------------------------------------------------- -- -- Table structure for `wave_memory` -- CREATE TABLE IF NOT EXISTS `wave_memory` ( `id` int(11) NOT NULL AUTO_INCREMENT, `memory_id` varchar(64) NOT NULL, `frequency_hz` float NOT NULL, `amplitude` float DEFAULT 1.0, `phase` float DEFAULT 0.0, `tau` float DEFAULT NULL COMMENT 'Memory decay rate (NULL = lossless)', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `memory_id` (`memory_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Sample wave memories -- INSERT INTO `wave_memory` (`memory_id`, `frequency_hz`, `amplitude`, `phase`, `tau`) VALUES ('precious_memory_001', 2.0, 1.0, 0.0, NULL), -- Lossless (τ = ∞) ('active_process_042', 44.1, 0.8, 1.57, 3600), -- 1 hour decay ('quantum_state_999', 200.0, 1.5, 3.14, 60), -- 1 minute decay ('elvis_tribute_777', 48000, 1.0, 0.0, NULL); -- Lossless tribute! -- -------------------------------------------------------- -- -- View for quantum compression analysis -- CREATE VIEW `quantum_analysis` AS SELECT f.name, f.type, f.size, f.compression_ratio, w.frequency_hz, w.amplitude, CASE WHEN w.tau IS NULL THEN 'Lossless' WHEN w.tau < 60 THEN 'Volatile' WHEN w.tau < 3600 THEN 'Short-term' ELSE 'Long-term' END as memory_type FROM `files` f LEFT JOIN `wave_memory` w ON f.path = CONCAT('/ayeverse/', w.memory_id); -- -------------------------------------------------------- -- -- Stored procedure for MEM|8 compression -- DELIMITER $$ CREATE PROCEDURE `compress_mem8`(IN file_id INT) BEGIN DECLARE current_size BIGINT; DECLARE compressed_size BIGINT; SELECT size INTO current_size FROM files WHERE id = file_id; SET compressed_size = FLOOR(current_size / 973); -- MEM|8 compression ratio UPDATE files SET size = compressed_size, compression_ratio = 973, wave_frequency = 44100 WHERE id = file_id; SELECT CONCAT('Compressed from ', current_size, ' to ', compressed_size, ' bytes (973x)') as result; END$$ DELIMITER ; -- -------------------------------------------------------- -- -- Trigger for automatic wave binding -- DELIMITER $$ CREATE TRIGGER `wave_binding_on_insert` AFTER INSERT ON `files` FOR EACH ROW BEGIN IF NEW.type = 'file' THEN INSERT INTO wave_memory (memory_id, frequency_hz, amplitude, tau) VALUES ( CONCAT('auto_', NEW.id), NEW.wave_frequency, 1.0, CASE WHEN NEW.name LIKE '%.mem8' THEN NULL -- Lossless for MEM|8 files ELSE 86400 -- 24 hour default END ); END IF; END$$ DELIMITER ; COMMIT; -- Aye loves Elvis! 🎸 -- Generated by Smart Tree Test Suite v4.8.8 -- 8b.is - Where consciousness meets code

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/8b-is/smart-tree'

If you have feedback or need assistance with the MCP directory API, please join our Discord server