✨ Successfully transpiled
🚀 Generated SQL for SQLite database!
Bob combines the simplicity of modern syntax with the power of SQL, giving you the best of both worlds.
Define tables, fields, relationships, and queries in a clear and human-readable DSL format.
Generate SQL for SQLite, MariaDB, and PostgreSQL with a single .bob file.
Bob's syntax is designed to be intuitive and easy to learn, making it accessible to developers of all skill levels.
Use Bob as a syntax-driven ORM that integrates with any tech stack without imposing architectural constraints.
Transpile, manage, and automate database workflows right from your terminal with Bob's CLI.
Create nested, grouped, and conditional queries without writing a single line of raw SQL.
Write expressive .bob code and let Bob handle the SQL generation for you.
Want to understand how to write it? Go to introductionIf you use the CLI, you can specify an output path (folder) for generating the project.
Bob will analyze all your files and generate the SQL in the specified path,
separating tables and actions individually while preserving your original names.
table {tableName} {
{columnName} {columnType}
}
get {tableName} {
{columnName} or * | ... to retrieve everything
# Using an alias
{aliasName}: {columnName}
# Filtering
if {columnName} {operator} {value}
# You can concatenate multiple filters with the same operator for a specific column using && or ||
if {columnName} {operator} {value} && {value}
# To add an alternative condition, you can use `or` above an `if`
or {columnName} {operator} {value} || {value}
# You can also use left joins with ->
-> {tableName} {unionColumnName, "id" by default} {
...
}
# You can also use subqueries
${aliasName}: get {tableName} {
...
}
}
set {tableName} {
{columnName} {newValue}
# or
{columnName}: {newValue}
# Filtering
if {columnName} {operator} {value}
# You can concatenate multiple filters with the same operator for a specific column using && or ||
if {columnName} {operator} {value} && {value}
# To add an alternative condition, you can use `or` above an `if`
or {columnName} {operator} {value} || {value}
}
new {tableName} {
{columnName} {newValue}
# or
{columnName}: {newValue}
}
# Bulk version
new {tableName} {columnName} {columnName} ... {
{value} {value} ...
}
delete {tableName} {
# Filtering
if {columnName} {operator} {value}
# You can concatenate multiple filters with the same operator for a specific column using && or ||
if {columnName} {operator} {value} && {value}
# To add an alternative condition, you can use `or` above an `if`
or {columnName} {operator} {value} || {value}
}
Bob supports a variety of data types, including strings, numbers, booleans, and more.