Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.
/ server Public archive

Quark is a database management system with simple, yet powerful querying language. The philosophy of Quark brings you a ton of tools for both programmers and other users.

Notifications You must be signed in to change notification settings

quark-database/server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quark Banner

Java CI with Maven GitHub tag License issues - server Coverage

About Quark Server

Caution

Quark Server is deprecated. Please, use Quark Cloud instead.

Documentation

This documentation is for Quark 3.0.0 in development.

ℹ️ Note for users of Quark older 3.0.0

For older versions of Quark, please, search for README.md in the release commit with tag you want. We are currently working on a documentation system with multiple versions. Thank you.

Instructions

Instructions are used to create tables, query data, and much more.

add column

Adds a new column to a table

Permission: column.add

Parameters:

  • definition: column

  • table: str

  • generator: generator

Syntax:

add column (column: definition): table = str, generator = generator;

change in

Changes records match the condition

Permission: table.change

Parameters:

  • table: str

  • selector: selector

  • changer: changer

Syntax:

change in (str: table): selector = selector, changer = changer;

change port to

Changes the server port

Permission: server.port.change

Parameters:

  • port: int

Syntax:

change port to (int: port);

clear database

Deletes all the tables inside the database

Permission: database.clear

Parameters:

  • database: str

Syntax:

clear database (str: database);

clear table

Removes all the records from the table

Permission: table.clear

Parameters:

  • table: str

Syntax:

clear table (str: table);

clone database

Copies the database with all the contents

Permission: database.clone

Parameters:

  • prototype: str

  • destination: str

Syntax:

clone database (str: prototype): destination = str;

clone database scheme

Clones the database, but clears the tables

Permission: database.scheme

Parameters:

  • prototype: str

  • destination: str

Syntax:

clone database scheme (str: prototype): destination = str;

clone table

Clones the table

Permission: table.clone

Parameters:

  • prototype: str

  • destination: str

Syntax:

clone table (str: prototype): destination = str;

clone table scheme

Clones the table, but deletes the records

Permission: table.scheme

Parameters:

  • prototype: str

  • destination: str

Syntax:

clone table scheme (str: prototype): destination = str;

create database

Creates a database

Permission: database.create

Parameters:

  • name: str

Syntax:

create database (str: name);

create table

Creates a table

Permission: table.create

Parameters:

  • table: str

  • columns: list of column

  • records: list of record

Syntax:

create table (str: table): columns = list of column, records = list of record;

create token

Creates an access token

Permission: token.create

Parameters:

  • token: str

  • permissions: list of str

Syntax:

create token (str: token): permissions = list of str;

_debug

Does stuff for Quark developers. Don't use.

Permission: !unsafe.debug

Parameters:

  • json: str

Syntax:

_debug: json = str;

delete column

Deletes a column in a table

Permission: column.delete

Parameters:

  • name: str

  • table: str

Syntax:

delete column (str: name): table = str;

delete database

Deletes a database

Permission: database.delete

Parameters:

  • database: str

Syntax:

delete database (str: database);

delete from

Deletes records meet the condition

Permission: json.delete

Parameters:

  • table: str

  • selector: selector

  • skip: int

  • limit: int

Syntax:

delete from (str: table): selector = selector, skip = int, limit = int;

delete table

Deletes a table

Permission: table.delete

Parameters:

  • table: str

Syntax:

delete table (str: table);

eval

Evaluates the Quark QL entity.

Permission: !unsafe.eval

Parameters:

  • entity: ?

Syntax:

eval (?: entity);

factory reset

Resets the server to factory settings

Permission: !unsafe.factory-reset

Parameters:

Syntax:

factory reset;

grant token

Grants a token a permission

Permission: token.grand

Parameters:

  • token: str

  • permission: str

Syntax:

grant token (str: token): permission = str;

insert into

Inserts a new record to a table

Permission: table.insert

Parameters:

  • table: str

  • record: record

Syntax:

insert into (str: table): record = record;

list columns in

Lists columns in a table

Permission: column.list

Parameters:

  • table: str

Syntax:

list columns in (str: table);

list databases

Lists the databases

Permission: databases.list

Parameters:

Syntax:

list databases;

list tables in

Lists tables in a database

Permission: table.list

Parameters:

  • database: str

Syntax:

list tables in (str: database);

redefine permissions for token

Defines a new set of permissions for a token

Permission: token.redefine

Parameters:

  • token: str

  • permissions: list of str

Syntax:

redefine permissions for token (str: token): permissions = list of str;

reload server

Reloads the server

Permission: server.reload

Parameters:

Syntax:

reload server;

rename column in

Renames a column in a table

Permission: column.rename

Parameters:

  • table: str

  • old: str

  • new: str

Syntax:

rename column in (str: table): old = str, new = str;

rename database

Renames a database

Permission: database.rename

Parameters:

  • old: str

  • new: str

Syntax:

rename database: old = str, new = str;

rename server to

Renames the server

Permission: server.rename

Parameters:

  • new: str

Syntax:

rename server to (str: new);

rename table

Renames a table

Permission: table.rename

Parameters:

  • old: str

  • new: str

Syntax:

rename table: old = str, new = str;

reorder columns in

Changes the column order

Permission: column.reorder

Parameters:

  • table: str

  • order: list of str

Syntax:

reorder columns in (str: table): order = list of str;

run command

Runs a command

Permission: server.command

Parameters:

  • command: str

Syntax:

run command (str: command);

schedule command

Schedules a command

Permission: server.schedule.command

Parameters:

  • command: str

  • period: long

Syntax:

schedule command (str: command): period = long;

schedule query

Schedules a query

Permission: server.schedule.query

Parameters:

  • query: str

  • period: long

Syntax:

schedule query (str: query): period = long;

select from

Selects records from a table

Permission: json.select

Parameters:

  • table: str

  • selector: selector

  • skip: int

  • limit: int

Syntax:

select from (str: table): selector = selector, skip = int, limit = int;

stop server

Stop the server

Permission: server.stop

Parameters:

Syntax:

stop server;

swap columns in

Swaps two columns in a table

Permission: columns.swap

Parameters:

  • table: str

  • first: str

  • second: str

Syntax:

swap columns in (str: table): first = str, second = str;

remove permission from token

Removes a permission from a token

Permission: token.remove permission

Parameters:

  • token: str

  • permission: str

Syntax:

remove permission from token (str: token): permission = str;

_describe instructions

Describes all the instructions. Don't use.

Permission: any

Parameters:

Syntax:

_describe instructions;

_describe constructors

Describes all the constructors. Don't use.

Permission: any

Parameters:

Syntax:

_describe constructors;

_hint next elements

Hints the next elements for editor hints. Don't use.

Permission: any

Parameters:

  • query: str

  • caret position: int

Syntax:

_hint next elements: query = str, caret position = int;

get server name

Returns the server name

Permission: any

Parameters:

Syntax:

get server name;

secret

What does it do? Hm-m...

Permission: any

Parameters:

Syntax:

secret;

add modifier to

Adds a new table modifier

Permission: table.add modifier

Parameters:

  • table: str

  • column: str

  • modifier: modifier

Syntax:

add modifier to (str: table): column = str, modifier = modifier;

list plugins

Lists loaded plugins

Permission: server.plugins

Parameters:

Syntax:

list plugins;

find in

Quickly finds a record by a single field

Permission: table.find

Parameters:

  • table: str

  • finder: finder

Syntax:

find in (str: table): finder = finder;

count in

Counts records matching condition

Permission: table.count in

Parameters:

  • table: str

  • selector: selector

Syntax:

count in (str: table): selector = selector;

_describe modifiers of

Shows all the modifiers of the table. Don't use

Permission: table.describe modifiers

Parameters:

  • table: str

Syntax:

_describe modifiers of (str: table);

clear scheduled commands

Clears all the scheduled commands.

Permission: server.schedule.command.clear

Parameters:

Syntax:

clear scheduled commands;

clear scheduled queries

Clears all the scheduled queries.

Permission: server.schedule.query.clear

Parameters:

Syntax:

clear scheduled queries;

get variable in

Shows the variable value of the table

Permission: table.variable.get

Parameters:

  • table: str

  • name: str

Syntax:

get variable in (str: table): name = str;

set variable in

Sets a new value for a variable in the table

Permission: table.variable.set

Parameters:

  • table: str

  • name: str

  • value: ?

Syntax:

set variable in (str: table): name = str, value = ?;

list variables in

Shows all the variables inside the table

Permission: table.variable.list

Parameters:

  • table: str

Syntax:

list variables in (str: table);

delete variable in

Deletes a variable in the table

Permission: table.variable.delete

Parameters:

  • table: str

  • name: str

Syntax:

delete variable in (str: table): name = str;

exclude from

Excludes the records matches the finder

Permission: table.exclude

Parameters:

  • table: str

  • finder: finder

Syntax:

exclude from (str: table): finder = finder;

get version

Returns Quark's version

Permission: any

Parameters:

Syntax:

get version;

var

Defines a variable

Permission: var

Parameters:

  • name: str

  • value: ?

Syntax:

var (str: name): value = ?;

Constructors

Constructors can transform entities in both your instructions and tables. Use them for integers, strings, lists, and any other type of entities.

abs: double

Abs

Parameters:

  • arg0: double

Syntax:

double @abs(double: arg0)

sin: double

Sin

Parameters:

  • arg0: double

Syntax:

double @sin(double: arg0)

cos: double

Cos

Parameters:

  • arg0: double

Syntax:

double @cos(double: arg0)

tan: double

Tan

Parameters:

  • arg0: double

Syntax:

double @tan(double: arg0)

atan2: double

Atan2

Parameters:

  • arg0: double

  • arg1: double

Syntax:

double @atan2(double: arg0, double: arg1)

sqrt: double

Sqrt

Parameters:

  • arg0: double

Syntax:

double @sqrt(double: arg0)

log: double

Log

Parameters:

  • arg0: double

Syntax:

double @log(double: arg0)

log10: double

Log10

Parameters:

  • arg0: double

Syntax:

double @log10(double: arg0)

pow: double

Pow

Parameters:

  • arg0: double

  • arg1: double

Syntax:

double @pow(double: arg0, double: arg1)

exp: double

Exp

Parameters:

  • arg0: double

Syntax:

double @exp(double: arg0)

min: double

Min

Parameters:

  • arg0: double

  • arg1: double

Syntax:

double @min(double: arg0, double: arg1)

max: double

Max

Parameters:

  • arg0: double

  • arg1: double

Syntax:

double @max(double: arg0, double: arg1)

floor: double

Floor

Parameters:

  • arg0: double

Syntax:

double @floor(double: arg0)

ceil: double

Ceil

Parameters:

  • arg0: double

Syntax:

double @ceil(double: arg0)

rint: double

Rint

Parameters:

  • arg0: double

Syntax:

double @rint(double: arg0)

round: int

Round

Parameters:

  • arg0: float

Syntax:

int @round(float: arg0)

add exact: long

Add exact

Parameters:

  • arg0: long

  • arg1: long

Syntax:

long @add exact(long: arg0, long: arg1)

decrement exact: int

Decrement exact

Parameters:

  • arg0: int

Syntax:

int @decrement exact(int: arg0)

increment exact: long

Increment exact

Parameters:

  • arg0: long

Syntax:

long @increment exact(long: arg0)

multiply exact: long

Multiply exact

Parameters:

  • arg0: long

  • arg1: long

Syntax:

long @multiply exact(long: arg0, long: arg1)

multiply high: long

Multiply high

Parameters:

  • arg0: long

  • arg1: long

Syntax:

long @multiply high(long: arg0, long: arg1)

unsigned multiply high: long

Unsigned multiply high

Parameters:

  • arg0: long

  • arg1: long

Syntax:

long @unsigned multiply high(long: arg0, long: arg1)

negate exact: int

Negate exact

Parameters:

  • arg0: int

Syntax:

int @negate exact(int: arg0)

subtract exact: long

Subtract exact

Parameters:

  • arg0: long

  • arg1: long

Syntax:

long @subtract exact(long: arg0, long: arg1)

fma: double

Fma

Parameters:

  • arg0: double

  • arg1: double

  • arg2: double

Syntax:

double @fma(double: arg0, double: arg1, double: arg2)

copy sign: double

Copy sign

Parameters:

  • arg0: double

  • arg1: double

Syntax:

double @copy sign(double: arg0, double: arg1)

signum: double

Signum

Parameters:

  • arg0: double

Syntax:

double @signum(double: arg0)

clamp: float

Clamp

Parameters:

  • arg0: float

  • arg1: float

  • arg2: float

Syntax:

float @clamp(float: arg0, float: arg1, float: arg2)

scalb: float

Scalb

Parameters:

  • arg0: float

  • arg1: int

Syntax:

float @scalb(float: arg0, int: arg1)

get exponent: int

Get exponent

Parameters:

  • arg0: double

Syntax:

int @get exponent(double: arg0)

floor mod: int

Floor mod

Parameters:

  • arg0: int

  • arg1: int

Syntax:

int @floor mod(int: arg0, int: arg1)

asin: double

Asin

Parameters:

  • arg0: double

Syntax:

double @asin(double: arg0)

acos: double

Acos

Parameters:

  • arg0: double

Syntax:

double @acos(double: arg0)

atan: double

Atan

Parameters:

  • arg0: double

Syntax:

double @atan(double: arg0)

cbrt: double

Cbrt

Parameters:

  • arg0: double

Syntax:

double @cbrt(double: arg0)

i e e eremainder: double

i e e eremainder

Parameters:

  • arg0: double

  • arg1: double

Syntax:

double @ i e e eremainder(double: arg0, double: arg1)

floor div: long

Floor div

Parameters:

  • arg0: long

  • arg1: long

Syntax:

long @floor div(long: arg0, long: arg1)

ceil div: long

Ceil div

Parameters:

  • arg0: long

  • arg1: long

Syntax:

long @ceil div(long: arg0, long: arg1)

ceil mod: long

Ceil mod

Parameters:

  • arg0: long

  • arg1: long

Syntax:

long @ceil mod(long: arg0, long: arg1)

power of two d: double

Power of two d

Parameters:

  • arg0: int

Syntax:

double @power of two d(int: arg0)

power of two f: float

Power of two f

Parameters:

  • arg0: int

Syntax:

float @power of two f(int: arg0)

sinh: double

Sinh

Parameters:

  • arg0: double

Syntax:

double @sinh(double: arg0)

cosh: double

Cosh

Parameters:

  • arg0: double

Syntax:

double @cosh(double: arg0)

tanh: double

Tanh

Parameters:

  • arg0: double

Syntax:

double @tanh(double: arg0)

hypot: double

Hypot

Parameters:

  • arg0: double

  • arg1: double

Syntax:

double @hypot(double: arg0, double: arg1)

expm1: double

Expm1

Parameters:

  • arg0: double

Syntax:

double @expm1(double: arg0)

log1p: double

Log1p

Parameters:

  • arg0: double

Syntax:

double @log1p(double: arg0)

to radians: double

To radians

Parameters:

  • arg0: double

Syntax:

double @to radians(double: arg0)

to degrees: double

To degrees

Parameters:

  • arg0: double

Syntax:

double @to degrees(double: arg0)

random: double

Random

Parameters:

Syntax:

double @random

divide exact: int

Divide exact

Parameters:

  • arg0: int

  • arg1: int

Syntax:

int @divide exact(int: arg0, int: arg1)

floor div exact: long

Floor div exact

Parameters:

  • arg0: long

  • arg1: long

Syntax:

long @floor div exact(long: arg0, long: arg1)

ceil div exact: long

Ceil div exact

Parameters:

  • arg0: long

  • arg1: long

Syntax:

long @ceil div exact(long: arg0, long: arg1)

to int exact: int

To int exact

Parameters:

  • arg0: long

Syntax:

int @to int exact(long: arg0)

multiply full: long

Multiply full

Parameters:

  • arg0: int

  • arg1: int

Syntax:

long @multiply full(int: arg0, int: arg1)

abs exact: long

Abs exact

Parameters:

  • arg0: long

Syntax:

long @abs exact(long: arg0)

ulp: double

Ulp

Parameters:

  • arg0: double

Syntax:

double @ulp(double: arg0)

next after: float

Next after

Parameters:

  • arg0: float

  • arg1: double

Syntax:

float @next after(float: arg0, double: arg1)

next up: double

Next up

Parameters:

  • arg0: double

Syntax:

double @next up(double: arg0)

next down: double

Next down

Parameters:

  • arg0: double

Syntax:

double @next down(double: arg0)

limit: int

Limit

Parameters:

  • integer: int

  • min: int

  • max: int

Syntax:

int @limit(int: integer, int: min, int: max)

between: boolean

Between

Parameters:

  • min: int

  • integer: int

  • max: int

Syntax:

boolean @between(int: min, int: integer, int: max)

count digits: int

Count digits

Parameters:

  • integer: int

Syntax:

int @count digits(int: integer)

index limit: int

Index limit

Parameters:

  • integer: int

  • length: int

Syntax:

int @index limit(int: integer, int: length)

positive modulus: int

Positive modulus

Parameters:

  • integer: int

  • divisor: int

Syntax:

int @positive modulus(int: integer, int: divisor)

now: date

Now

Parameters:

Syntax:

date @now

upper: str

The string in upper case

Parameters:

  • string to uppercase: str

Syntax:

str @upper(str: string to uppercase)

lower: str

The string in lower case

Parameters:

  • string to lowercase: str

Syntax:

str @lower(str: string to lowercase)

list: list

A new list of values

Parameters:

  • values: ?

Syntax:

list @list(? varargs: values)

yes: boolean

The true value

Parameters:

Syntax:

boolean @yes

no: boolean

The false value

Parameters:

Syntax:

boolean @no

concat: str

Concatenated string

Parameters:

  • strings: str

Syntax:

str @concat(str varargs: strings)

selector: selector

The selector

Parameters:

  • selector lambda: str

Syntax:

selector @selector(str: selector lambda)

and: boolean

Result of and

Parameters:

  • booleans: boolean

Syntax:

boolean @and(boolean varargs: booleans)

capitalize: str

Capitalized string

Parameters:

  • string to capitalize: str

Syntax:

str @capitalize(str: string to capitalize)

invert case: str

The string with case inverted

Parameters:

  • string where to switch case: str

Syntax:

str @invert case(str: string where to switch case)

count: int

Number of elements inside the list

Parameters:

  • list to count elements: list of ?

Syntax:

int @count(list of ?: list to count elements)

digit count: int

Count of digits of the integer

Parameters:

  • integer: int

Syntax:

int @digit count(int: integer)

e: float

The value of 'e' math constant

Parameters:

Syntax:

float @e

empty list of: list

An empty list with specified type

Parameters:

  • type name of a new list: str

Syntax:

list @empty list of(str: type name of a new list)

ends with: boolean

Is string ends with the suffix

Parameters:

  • string: str

  • suffix: str

Syntax:

boolean @ends with(str: string, str: suffix)

equals: boolean

Are these objects equal

Parameters:

  • first object: ?

  • second object: ?

Syntax:

boolean @equals(?: first object, ?: second object)

from binary string: int

The value of the binary string

Parameters:

  • binary string to convert to integer: str

Syntax:

int @from binary string(str: binary string to convert to integer)

from hex string: int

The value of the hex string

Parameters:

  • hex string to convert to integer: str

Syntax:

int @from hex string(str: hex string to convert to integer)

from octal string: int

The value of the octal string

Parameters:

  • octal string to convert to integer: str

Syntax:

int @from octal string(str: octal string to convert to integer)

greater: boolean

Is the first number greater than the second

Parameters:

  • first number: float

  • second number: float

Syntax:

boolean @greater(float: first number, float: second number)

greater or equals: boolean

Is the first number greater than the second or equals to

Parameters:

  • first number: float

  • second number: float

Syntax:

boolean @greater or equals(float: first number, float: second number)

is string empty: boolean

Is the string empty

Parameters:

  • string: str

Syntax:

boolean @is string empty(str: string)

join: list

A joined list

Parameters:

  • first list: list of ?

  • more lists: list of ?

Syntax:

list @join(list of ?: first list, list of ? varargs: more lists)

left trim: str

The left trimmed string

Parameters:

  • string to trim: str

Syntax:

str @left trim(str: string to trim)

length: int

The length of the string

Parameters:

  • string to count characters in: str

Syntax:

int @length(str: string to count characters in)

less: boolean

Is the first number is less than the second

Parameters:

  • first number: float

  • second number: float

Syntax:

boolean @less(float: first number, float: second number)

less or equals: boolean

Is the first number is less than the second or equals to

Parameters:

  • first number: float

  • second number: float

Syntax:

boolean @less or equals(float: first number, float: second number)

matches: boolean

Is the string matches regex

Parameters:

  • string to check: str

  • regex lambda: str

Syntax:

boolean @matches(str: string to check, str: regex lambda)

reverse string: str

The reversed string

Parameters:

  • string to reverse: str

Syntax:

str @reverse string(str: string to reverse)

or: boolean

The result of or

Parameters:

  • booleans: boolean

Syntax:

boolean @or(boolean varargs: booleans)

pi: float

The value of pi constant

Parameters:

Syntax:

float @pi

random between: int

The random value

Parameters:

  • inclusive min: int

  • exclusive max: int

Syntax:

int @random between(int: inclusive min, int: exclusive max)

repeat: str

The repeated string

Parameters:

  • string to repeat: str

  • times to repeat: int

Syntax:

str @repeat(str: string to repeat, int: times to repeat)

replace: str

The string with replaced entries

Parameters:

  • string where to replace: str

  • string to be replaced: str

  • string to replace: str

Syntax:

str @replace(str: string where to replace, str: string to be replaced, str: string to replace)

right trim: str

The right trimmed string

Parameters:

  • string to trim: str

Syntax:

str @right trim(str: string to trim)

sort: list

The sorted list

Parameters:

  • list to sort: list

Syntax:

list @sort(list: list to sort)

split: list

The string parts

Parameters:

  • string to split: str

  • delimiter: str

Syntax:

list @split(str: string to split, str: delimiter)

starts with: boolean

Does the string start with the prefix

Parameters:

  • string: str

  • prefix: str

Syntax:

boolean @starts with(str: string, str: prefix)

string contains: boolean

Does the string contain the entry

Parameters:

  • string where to search: str

  • searching string: str

Syntax:

boolean @string contains(str: string where to search, str: searching string)

to binary string: str

The binary string

Parameters:

  • integer to convert to binary string: int

Syntax:

str @to binary string(int: integer to convert to binary string)

to boolean: boolean

The boolean

Parameters:

  • string to convert to boolean: str

  • default boolean value if conversation fails: boolean

Syntax:

boolean @to boolean(str: string to convert to boolean, optional boolean: default boolean value if conversation fails)

to float: float

The float

Parameters:

  • string to convert to float: str

  • default float value if conversation fails: float

Syntax:

float @to float(str: string to convert to float, optional float: default float value if conversation fails)

to hex string: str

The hex string

Parameters:

  • integer to convert to hex string: int

Syntax:

str @to hex string(int: integer to convert to hex string)

to int: int

The integer

Parameters:

  • string to convert to integer: str

  • default integer value if conversation fails: int

Syntax:

int @to int(str: string to convert to integer, optional int: default integer value if conversation fails)

to octal string: str

The octal string

Parameters:

  • integer to convert to octal string: int

Syntax:

str @to octal string(int: integer to convert to octal string)

trim: str

The trimmed string

Parameters:

  • string to trim: str

Syntax:

str @trim(str: string to trim)

divide: float

Fraction

Parameters:

  • number to divide: float

  • divisor: float

Syntax:

float @divide(float: number to divide, float: divisor)

multiply: float

The product

Parameters:

  • numbers to multiply: float

Syntax:

float @multiply(float varargs: numbers to multiply)

not: boolean

Negated value

Parameters:

  • boolean to invert: boolean

Syntax:

boolean @not(boolean: boolean to invert)

subtract: float

The difference

Parameters:

  • number to subtract from: float

  • numbers to subtract: float

Syntax:

float @subtract(float: number to subtract from, float varargs: numbers to subtract)

sum: float

The sum

Parameters:

  • numbers to sum: float

Syntax:

float @sum(float varargs: numbers to sum)

record: record

The record

Parameters:

  • values: ?

Syntax:

record @record(? varargs: values)

changer: changer

The record changer

Parameters:

  • column name to change: str

  • changer lambda: str

Syntax:

changer @changer(str: column name to change, str: changer lambda)

null: any

The null constant

Parameters:

  • type of null: str

Syntax:

nullable any @null(optional str: type of null)

generator: generator

The field generator

Parameters:

  • lambda: str

Syntax:

generator @generator(str: lambda)

finder: finder

The finder

Parameters:

  • column name: str

  • finding object: ?

Syntax:

finder @finder(str: column name, ?: finding object)

date from stamp: date

The date from unix timestamp

Parameters:

  • unix time stamp: long

Syntax:

date @date from stamp(long: unix time stamp)

milliseconds: long

The amount of milliseconds

Parameters:

  • milliseconds: long

Syntax:

long @milliseconds(long: milliseconds)

seconds: long

The amount of milliseconds

Parameters:

  • seconds: long

Syntax:

long @seconds(long: seconds)

minutes: long

The amount of milliseconds

Parameters:

  • minutes: long

Syntax:

long @minutes(long: minutes)

hours: long

The amount of milliseconds

Parameters:

  • hours: long

Syntax:

long @hours(long: hours)

days: long

The amount of milliseconds

Parameters:

  • days: long

Syntax:

long @days(long: days)

weeks: long

The amount of milliseconds

Parameters:

  • weeks: long

Syntax:

long @weeks(long: weeks)

months: long

The amount of milliseconds

Parameters:

  • months: long

Syntax:

long @months(long: months)

years: long

The amount of milliseconds

Parameters:

  • years: long

Syntax:

long @years(long: years)

date from format: date

The date from the format passed in

Parameters:

  • date format: str

  • formatted date: str

Syntax:

date @date from format(str: date format, str: formatted date)

millisecond: long

1 millisecond

Parameters:

Syntax:

long @millisecond

second: long

Milliseconds in 1 second

Parameters:

Syntax:

long @second

minute: long

Milliseconds in 1 minute

Parameters:

Syntax:

long @minute

hour: long

Milliseconds in 1 hour

Parameters:

Syntax:

long @hour

day: long

Milliseconds in 1 day

Parameters:

Syntax:

long @day

week: long

Milliseconds in 1 week

Parameters:

Syntax:

long @week

month: long

Milliseconds in 1 month

Parameters:

Syntax:

long @month

year: long

Milliseconds in 1 year

Parameters:

Syntax:

long @year

cast: any

Casted entity

Parameters:

  • casting entity: ?

  • cast type: str

Syntax:

any @cast(?: casting entity, str: cast type)

var: any

The value of the variable

Parameters:

  • variable name: str

Syntax:

any @var(str: variable name)

require between: modifier

The column modifier

Parameters:

  • min: float

  • max: float

Syntax:

modifier @require between(float: min, float: max)

require constant: modifier

The column modifier

Parameters:

Syntax:

modifier @require constant

incrementing: modifier

The column modifier

Parameters:

Syntax:

modifier @incrementing

require negative: modifier

The column modifier

Parameters:

Syntax:

modifier @require negative

require not negative: modifier

The column modifier

Parameters:

Syntax:

modifier @require not negative

positive: modifier

The column modifier

Parameters:

Syntax:

modifier @positive

require not positive: modifier

The column modifier

Parameters:

Syntax:

modifier @require not positive

alpha dash dot underscore: modifier

The column modifier

Parameters:

Syntax:

modifier @alpha dash dot underscore

alpha dash: modifier

The column modifier

Parameters:

Syntax:

modifier @alpha dash

alpha dash numeric: modifier

The column modifier

Parameters:

Syntax:

modifier @alpha dash numeric

alpha dash underscore: modifier

The column modifier

Parameters:

Syntax:

modifier @alpha dash underscore

alpha dot: modifier

The column modifier

Parameters:

Syntax:

modifier @alpha dot

alpha dot underscore: modifier

The column modifier

Parameters:

Syntax:

modifier @alpha dot underscore

alpha underscore: modifier

The column modifier

Parameters:

Syntax:

modifier @alpha underscore

email: modifier

The column modifier

Parameters:

Syntax:

modifier @email

not blank: modifier

The column modifier

Parameters:

Syntax:

modifier @not blank

required: modifier

The column modifier

Parameters:

Syntax:

modifier @required

regex: modifier

The column modifier

Parameters:

Syntax:

modifier @regex

hex color: modifier

The column modifier

Parameters:

Syntax:

modifier @hex color

url: modifier

The column modifier

Parameters:

Syntax:

modifier @url

unique: modifier

The column modifier

Parameters:

Syntax:

modifier @unique

default: modifier

The column modifier

Parameters:

  • default value: ?

Syntax:

modifier @default(?: default value)

id: column

The column description

Parameters:

  • column name: str

  • modifiers: modifier

Syntax:

column @id(str: column name, modifier varargs: modifiers)

str: column

The column description

Parameters:

  • column name: str

  • modifiers: modifier

Syntax:

column @str(str: column name, modifier varargs: modifiers)

int: column

The column description

Parameters:

  • column name: str

  • modifiers: modifier

Syntax:

column @int(str: column name, modifier varargs: modifiers)

boolean: column

The column description

Parameters:

  • column name: str

  • modifiers: modifier

Syntax:

column @boolean(str: column name, modifier varargs: modifiers)

float: column

The column description

Parameters:

  • column name: str

  • modifiers: modifier

Syntax:

column @float(str: column name, modifier varargs: modifiers)

date: column

The column description

Parameters:

  • column name: str

  • modifiers: modifier

Syntax:

column @date(str: column name, modifier varargs: modifiers)

long: column

The column description

Parameters:

  • column name: str

  • modifiers: modifier

Syntax:

column @long(str: column name, modifier varargs: modifiers)

Commands

Commands helps with server interaction.

/exit

Stops the server so you will need to start it manually by launching 'Start Server.bat'. Note that ongoing processes will be halted.

Parameters:

Syntax:

exit

/help

Opens up the help menu contains all the commands with descriptions and syntax

Parameters:

  • command: STRING - If you need a help with some command (for example, you don't know the argument names or the command purpose), just add a command name to display the help

  • constructor: STRING - If you need a help with some constructor. just add the constructor name

Syntax:

help command <A command you need help with> constructor <A constructor you need help with>

/change-log-level

Takes a module with the name passed with 'for' argument and changes it's minimal log level to 'to' argument

Parameters:

  • for: STRING - A module that the minimal logging level should be changed for

  • to: STRING - A minimal logging level required to log

Syntax:

change-log-level for [module name] to [log level]

/open-debug

Opens up a debug dialog 'named'

Parameters:

  • for: STRING - The name of debug dialog you want to open

Syntax:

open-debug for [The name of debug dialog]

/enable-debug

Enables the debug logging for a module with name passed in the 'for' argument

Parameters:

  • for: STRING - A name of the module which log level should be switched to 'debug'

Syntax:

enable-debug for [The module name]

/disable-debug

Disables the debug for a module with name passed as the 'for' argument

Parameters:

  • for: STRING - The module name which log level should be switched back to 'info'

Syntax:

disable-debug for [The module name]

/constructors

Shows all the constructors available in this version of Quark QL

Parameters:

Syntax:

constructors

/instructions

Shows all the instructions available in this version of Quark QL

Parameters:

Syntax:

instructions

/run

Runs an instruction or a command

Parameters:

  • instruction: STRING - An instruction that should be run

  • command: STRING - A command that should be run

Syntax:

run instruction <An instruction to run> command <A command to run>

/test

Runs the small developers tests for Quark developers.

Parameters:

  • for: STRING - A name of the test to be run

  • json: STRING - A json for testing code. The usage of json passed differs from test to test.

Syntax:

test for [The test name] json <The test json>

/eval

Evaluates a Quark QL entity

Parameters:

  • expression: STRING - An expression to evaluate

Syntax:

eval expression [An expression]

/modifiers

Shows all the column modifiers provided by Quark

Parameters:

Syntax:

modifiers

/install

Creates all the necessary databases and tables for Quark Server to work. This command must never be called manually.

Parameters:

Syntax:

install

/factory-reset

Resets all the settings and databases to the before-use state.

Parameters:

Syntax:

factory-reset

/repair

Scans the Quark Server system files and creates them if needed.

Parameters:

Syntax:

repair

/clear-maven-output

Removes all the unnecessary files generated by Maven

Parameters:

Syntax:

clear-maven-output

/list-scheduled-tasks

Shows the list of all the scheduled tasks: queries and commands.

Parameters:

Syntax:

list-scheduled-tasks

/reload

Stops the Quark Server and starts it again. All the plugins will also be reloaded.

Parameters:

Syntax:

reload

/clear

Clears the server's console

Parameters:

Syntax:

clear

/list

Lists objects of type you specify

Parameters:

  • of: STRING - Type of objects you want to specify

Syntax:

list of [Object type]

/format

Formats the instruction that passed in

Parameters:

  • instruction: STRING - The instruction you want to be formatted

Syntax:

format instruction [The formatting instruction]

//

Reruns the last command with suggested name

Parameters:

Syntax:

/

/clean-mode

When Clean mode is enabled, the console is cleared after each command

Parameters:

Syntax:

clean-mode

About

Quark is a database management system with simple, yet powerful querying language. The philosophy of Quark brings you a ton of tools for both programmers and other users.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages