GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - harshdoesdev/rayql: RayQL is a schema definition and query language for SQLite

BranchesTags
Open more actions menu

Latest commit

 

History

109 Commits
109 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
rayql-engine
rayql-engine
 
 
rayql-wasm
rayql-wasm
 
 
src
src
 
 
.gitignore
.gitignore
 
 
Cargo.toml
Cargo.toml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
install.sh
install.sh
 
 
old_banner.png
old_banner.png
 
 
rayql-logo.svg
rayql-logo.svg
 
 

Repository files navigation

RayQL

RayQL Logo

RayQL is a schema definition and query language for SQLite.

GitHub Actions Workflow Status GitHub License Discord

Join our Discord Channel

Online Editor

You can try RayQL using the Online RayQL editor.

Installation

You can install RayQL by running the following command in your terminal:

curl -s https://rayql.com/install.sh | sh

Schema Definition

You can define your database schema by creating a RayQL file called schema.rayql.

For example, it might look something like this:

# Enum for user types

enum user_type {
    admin
    developer
    normal
}

# Model declaration for 'user'

model user {
    id: int primary_key auto_increment,
    username: str unique,
    email: str unique, # this is an inline comment
    phone_number: str?,
    user_type: user_type default(user_type.normal)
}

# Model declaration for 'post'

model post {
    id: int primary_key auto_increment,
    title: str default('New Post'),
    content: str,
    author_id: int foreign_key(user.id),
    created_at: timestamp default(now()),
}

Then, when you run the rayql print command, it will generate and output the SQL equivalent of that model, which for the above example should look something like this:

CREATE TABLE IF NOT EXISTS user (
    id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    username TEXT NOT NULL UNIQUE,
    email TEXT NOT NULL UNIQUE,
    phone_number TEXT NULL,
    user_type TEXT NOT NULL CHECK(user_type IN ('admin', 'developer', 'normal')) DEFAULT 'normal'
);

CREATE TABLE IF NOT EXISTS post (
    id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    title TEXT NOT NULL DEFAULT 'New Post',
    content TEXT NOT NULL,
    author_id INTEGER NOT NULL,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (author_id) REFERENCES user(id)
);

Todo

  • Basic Schema Parser
  • rayql print command
  • Database commands
    • rayql db push and rayql db pull commands
    • rayql db migrate command
  • Typescript Types generator
  • Query Parser and Handler

About

RayQL is a schema definition and query language for SQLite

rayql.com

Topics

dslquery-dslquery-languageschemasqlite

Resources

Readme
MIT license
Activity

Stars

60 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.