Skip to main content
Get a VillageSQL Server instance running, connect to it, and try out the extension system.

Step 1: Clone and Build from Source

VillageSQL Server must be built from source for the initial alpha release. Follow the Clone and Build from Source Guide to compile from the latest code.

Step 2: Connect to the Server

Once your server is running, you can connect to it using any standard MySQL client.
mysql -u root -p

Step 3: Install Your First Extension

You can dynamically load extensions to add new data types and features. Install the vsql_complex extension to add support for complex numbers.
  1. Check currently installed extensions:
    SHOW EXTENSIONS;
    
  2. Install the extension:
    INSTALL EXTENSION 'vsql_complex';
    
  3. Verify installation:
    SHOW EXTENSIONS;
    
    You should see vsql_complex listed with status ACTIVE.

Step 4: Use Extended Data Types

Now that the extension is active, you can use the COMPLEX data type in your tables just like native types.
-- Create a table using the new COMPLEX type
CREATE TABLE electronic_components (
    id INT PRIMARY KEY,
    name VARCHAR(50),
    impedance COMPLEX
);

-- Insert complex number values
INSERT INTO electronic_components VALUES 
    (1, 'Resistor', COMPLEX(100.0, 0.0)),
    (2, 'Inductor', COMPLEX(0.0, 50.0));

-- Query the data
SELECT * FROM electronic_components;

Next Steps

Now that you have VillageSQL running and have verified the extension system, explore more: