code
stringlengths 26
870k
| docstring
stringlengths 1
65.6k
| func_name
stringlengths 1
194
| language
stringclasses 1
value | repo
stringlengths 8
68
| path
stringlengths 5
194
| url
stringlengths 46
254
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
def test_edgeql_syntax_ddl_function_35(self):
"""
CREATE FUNCTION std::foo(a: SET OF std::str) -> VARIADIC std::int64
USING SQL $a$SELECT $$foo$$$a$;
""" | CREATE FUNCTION std::foo(a: SET OF std::str) -> VARIADIC std::int64
USING SQL $a$SELECT $$foo$$$a$; | test_edgeql_syntax_ddl_function_35 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_36(self):
"""
CREATE FUNCTION foo(
a: OPTIONAL std::str,
NAMED ONLY b: OPTIONAL std::str,
NAMED ONLY c: OPTIONAL std::str = '1',
NAMED ONLY d: OPTIONAL std::str
) ->
std::int64 USING SQL FUNCTION 'aaa';
""" | CREATE FUNCTION foo(
a: OPTIONAL std::str,
NAMED ONLY b: OPTIONAL std::str,
NAMED ONLY c: OPTIONAL std::str = '1',
NAMED ONLY d: OPTIONAL std::str
) ->
std::int64 USING SQL FUNCTION 'aaa'; | test_edgeql_syntax_ddl_function_36 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_37(self):
"""
CREATE FUNCTION foo(
a: OPTIONAL std::str,
NAMED ONLY b: OPTIONAL std::str = '1',
NAMED ONLY c: OPTIONAL std::str,
d: OPTIONAL std::str
) ->
std::int64 USING SQL FUNCTION 'aaa';
""" | CREATE FUNCTION foo(
a: OPTIONAL std::str,
NAMED ONLY b: OPTIONAL std::str = '1',
NAMED ONLY c: OPTIONAL std::str,
d: OPTIONAL std::str
) ->
std::int64 USING SQL FUNCTION 'aaa'; | test_edgeql_syntax_ddl_function_37 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_38(self):
"""
CREATE FUNCTION foo(
s: OPTIONAL std::str,
NAMED ONLY c: OPTIONAL std::str,
NAMED ONLY s1: OPTIONAL std::str = '1',
VARIADIC v: OPTIONAL std::str = '1'
) ->
std::int64 USING SQL FUNCTION 'aaa';
""" | CREATE FUNCTION foo(
s: OPTIONAL std::str,
NAMED ONLY c: OPTIONAL std::str,
NAMED ONLY s1: OPTIONAL std::str = '1',
VARIADIC v: OPTIONAL std::str = '1'
) ->
std::int64 USING SQL FUNCTION 'aaa'; | test_edgeql_syntax_ddl_function_38 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_39(self):
"""
CREATE FUNCTION foo(
s: OPTIONAL std::str,
NAMED ONLY c: OPTIONAL std::str,
VARIADIC v: OPTIONAL std::str = '1',
NAMED ONLY s1: OPTIONAL std::str = '1'
) ->
std::int64 USING SQL FUNCTION 'aaa';
""" | CREATE FUNCTION foo(
s: OPTIONAL std::str,
NAMED ONLY c: OPTIONAL std::str,
VARIADIC v: OPTIONAL std::str = '1',
NAMED ONLY s1: OPTIONAL std::str = '1'
) ->
std::int64 USING SQL FUNCTION 'aaa'; | test_edgeql_syntax_ddl_function_39 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_40(self):
"""
CREATE FUNCTION foo(
`set`: OPTIONAL std::str,
VARIADIC `variadic`: OPTIONAL std::str,
`select`: OPTIONAL std::str = '1'
) ->
std::int64 USING SQL FUNCTION 'aaa';
""" | CREATE FUNCTION foo(
`set`: OPTIONAL std::str,
VARIADIC `variadic`: OPTIONAL std::str,
`select`: OPTIONAL std::str = '1'
) ->
std::int64 USING SQL FUNCTION 'aaa'; | test_edgeql_syntax_ddl_function_40 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_41(self):
"""
CREATE FUNCTION foo(
`set`: OPTIONAL std::str,
VARIADIC `variadic`: OPTIONAL std::str,
NAMED ONLY `create`: OPTIONAL std::str,
NAMED ONLY `select`: OPTIONAL std::str = '1'
) ->
std::int64 USING SQL FUNCTION 'aaa';
""" | CREATE FUNCTION foo(
`set`: OPTIONAL std::str,
VARIADIC `variadic`: OPTIONAL std::str,
NAMED ONLY `create`: OPTIONAL std::str,
NAMED ONLY `select`: OPTIONAL std::str = '1'
) ->
std::int64 USING SQL FUNCTION 'aaa'; | test_edgeql_syntax_ddl_function_41 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_42(self):
"""
CREATE FUNCTION std::strlen(VARIADIC b: std::str = '1')
-> std::int64
USING SQL FUNCTION 'strlen';
""" | CREATE FUNCTION std::strlen(VARIADIC b: std::str = '1')
-> std::int64
USING SQL FUNCTION 'strlen'; | test_edgeql_syntax_ddl_function_42 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_43(self):
"""
CREATE FUNCTION std::strlen($1: int32) -> int64
USING EdgeQL $$ SELECT 1 $$;
""" | CREATE FUNCTION std::strlen($1: int32) -> int64
USING EdgeQL $$ SELECT 1 $$; | test_edgeql_syntax_ddl_function_43 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_44(self):
"""
CREATE FUNCTION std::strlen(a: int16, b: str, a: int16) -> int64
USING EdgeQL $$ SELECT 1 $$;
""" | CREATE FUNCTION std::strlen(a: int16, b: str, a: int16) -> int64
USING EdgeQL $$ SELECT 1 $$; | test_edgeql_syntax_ddl_function_44 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_45(self):
"""
CREATE FUNCTION std::strlen(aa: int16, b: str,
NAMED ONLY aa: int16) -> int64
USING EdgeQL $$ SELECT 1 $$;
""" | CREATE FUNCTION std::strlen(aa: int16, b: str,
NAMED ONLY aa: int16) -> int64
USING EdgeQL $$ SELECT 1 $$; | test_edgeql_syntax_ddl_function_45 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_46(self):
"""
CREATE FUNCTION std::strlen(aa: int16, b: str,
VARIADIC aa: int16) -> int64
USING EdgeQL $$ SELECT 1 $$;
""" | CREATE FUNCTION std::strlen(aa: int16, b: str,
VARIADIC aa: int16) -> int64
USING EdgeQL $$ SELECT 1 $$; | test_edgeql_syntax_ddl_function_46 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_47(self):
"""
CREATE FUNCTION foo(
variadiC f: int64,
named only foo: OPTIONAL std::str,
nameD onlY bar: OPTIONAL std::str = '1'
) ->
std::int64 USING SQL FUNCTION 'aaa';
""" | CREATE FUNCTION foo(
variadiC f: int64,
named only foo: OPTIONAL std::str,
nameD onlY bar: OPTIONAL std::str = '1'
) ->
std::int64 USING SQL FUNCTION 'aaa'; | test_edgeql_syntax_ddl_function_47 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_48(self):
"""
CREATE FUNCTION __std__(
f: int64
) ->
std::int64 USING SQL FUNCTION 'aaa';
""" | CREATE FUNCTION __std__(
f: int64
) ->
std::int64 USING SQL FUNCTION 'aaa'; | test_edgeql_syntax_ddl_function_48 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_49(self):
"""
CREATE FUNCTION std::strlen(string: std::str,) -> std::int64
USING SQL FUNCTION 'strlen';
% OK %
CREATE FUNCTION std::strlen(string: std::str) -> std::int64
USING SQL FUNCTION 'strlen';
""" | CREATE FUNCTION std::strlen(string: std::str,) -> std::int64
USING SQL FUNCTION 'strlen';
% OK %
CREATE FUNCTION std::strlen(string: std::str) -> std::int64
USING SQL FUNCTION 'strlen'; | test_edgeql_syntax_ddl_function_49 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_50(self):
"""
CREATE FUNCTION std::strlen(string: std::str = '1',)
-> std::int64
USING SQL FUNCTION 'strlen';
% OK %
CREATE FUNCTION std::strlen(string: std::str = '1')
-> std::int64
USING SQL FUNCTION 'strlen';
""" | CREATE FUNCTION std::strlen(string: std::str = '1',)
-> std::int64
USING SQL FUNCTION 'strlen';
% OK %
CREATE FUNCTION std::strlen(string: std::str = '1')
-> std::int64
USING SQL FUNCTION 'strlen'; | test_edgeql_syntax_ddl_function_50 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_51(self):
"""
CREATE FUNCTION std::strlen(
a: std::str = '1',
VARIADIC b: std::str,
) -> std::int64
USING SQL FUNCTION 'strlen';
% OK %
CREATE FUNCTION std::strlen(
a: std::str = '1',
VARIADIC b: std::str
) -> std::int64
USING SQL FUNCTION 'strlen';
""" | CREATE FUNCTION std::strlen(
a: std::str = '1',
VARIADIC b: std::str,
) -> std::int64
USING SQL FUNCTION 'strlen';
% OK %
CREATE FUNCTION std::strlen(
a: std::str = '1',
VARIADIC b: std::str
) -> std::int64
USING SQL FUNCTION 'strlen'; | test_edgeql_syntax_ddl_function_51 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_52(self):
"""
CREATE FUNCTION foo(
a: OPTIONAL std::str,
NAMED ONLY b: OPTIONAL std::str,
NAMED ONLY c: OPTIONAL std::str = '1',
NAMED ONLY d: OPTIONAL std::str,
) ->
std::int64 USING SQL FUNCTION 'aaa';
% OK %
CREATE FUNCTION foo(
a: OPTIONAL std::str,
NAMED ONLY b: OPTIONAL std::str,
NAMED ONLY c: OPTIONAL std::str = '1',
NAMED ONLY d: OPTIONAL std::str
) ->
std::int64 USING SQL FUNCTION 'aaa';
""" | CREATE FUNCTION foo(
a: OPTIONAL std::str,
NAMED ONLY b: OPTIONAL std::str,
NAMED ONLY c: OPTIONAL std::str = '1',
NAMED ONLY d: OPTIONAL std::str,
) ->
std::int64 USING SQL FUNCTION 'aaa';
% OK %
CREATE FUNCTION foo(
a: OPTIONAL std::str,
NAMED ONLY b: OPTIONAL std::str,
NAMED ONLY c: OPTIONAL std::str = '1',
NAMED ONLY d: OPTIONAL std::str
) ->
std::int64 USING SQL FUNCTION 'aaa'; | test_edgeql_syntax_ddl_function_52 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_53(self):
"""
ALTER FUNCTION foo() USING ('no');
""" | ALTER FUNCTION foo() USING ('no'); | test_edgeql_syntax_ddl_function_53 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_function_54(self):
"""
ALTER FUNCTION foo() {
SET volatility := 'volatile';
USING ('no');
};
""" | ALTER FUNCTION foo() {
SET volatility := 'volatile';
USING ('no');
}; | test_edgeql_syntax_ddl_function_54 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_operator_01(self):
"""
CREATE INFIX OPERATOR
std::`OR` (a: std::bool, b: std::bool) -> std::bool {
SET volatility := 'Immutable';
USING SQL $$
SELECT ("a" OR "b") AND ("a"::int | "b"::int)::bool
$$;
};
""" | CREATE INFIX OPERATOR
std::`OR` (a: std::bool, b: std::bool) -> std::bool {
SET volatility := 'Immutable';
USING SQL $$
SELECT ("a" OR "b") AND ("a"::int | "b"::int)::bool
$$;
}; | test_edgeql_syntax_ddl_operator_01 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_operator_02(self):
"""
CREATE INFIX OPERATOR
std::`AND` (a: std::bool, b: std::bool) -> std::bool {
SET volatility := 'Immutable';
USING SQL EXPRESSION;
};
""" | CREATE INFIX OPERATOR
std::`AND` (a: std::bool, b: std::bool) -> std::bool {
SET volatility := 'Immutable';
USING SQL EXPRESSION;
}; | test_edgeql_syntax_ddl_operator_02 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_operator_03(self):
"""
CREATE INFIX OPERATOR
std::`=` (l: std::bool, r: std::bool) -> std::bool {
SET volatility := 'Immutable';
SET commutator := 'std::=';
SET negator := 'std::!=';
USING SQL OPERATOR '=';
};
""" | CREATE INFIX OPERATOR
std::`=` (l: std::bool, r: std::bool) -> std::bool {
SET volatility := 'Immutable';
SET commutator := 'std::=';
SET negator := 'std::!=';
USING SQL OPERATOR '=';
}; | test_edgeql_syntax_ddl_operator_03 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_operator_04(self):
"""
CREATE INFIX OPERATOR
std::`>` (l: std::int32, r: std::float32) -> std::bool {
SET volatility := 'Immutable';
SET commutator := 'std::<';
SET negator := 'std::<=';
USING SQL OPERATOR '>(float8,float8)';
};
""" | CREATE INFIX OPERATOR
std::`>` (l: std::int32, r: std::float32) -> std::bool {
SET volatility := 'Immutable';
SET commutator := 'std::<';
SET negator := 'std::<=';
USING SQL OPERATOR '>(float8,float8)';
}; | test_edgeql_syntax_ddl_operator_04 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_operator_05(self):
"""
CREATE ABSTRACT INFIX OPERATOR
std::`>=` (l: anytype, r: anytype) -> std::bool;
""" | CREATE ABSTRACT INFIX OPERATOR
std::`>=` (l: anytype, r: anytype) -> std::bool; | test_edgeql_syntax_ddl_operator_05 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_operator_06(self):
"""
ALTER INFIX OPERATOR std::`>=` (l: anytype, r: anytype) {
CREATE ANNOTATION description := 'gte';
};
""" | ALTER INFIX OPERATOR std::`>=` (l: anytype, r: anytype) {
CREATE ANNOTATION description := 'gte';
}; | test_edgeql_syntax_ddl_operator_06 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_operator_07(self):
"""
DROP INFIX OPERATOR std::`>=` (l: anytype, r: anytype);
""" | DROP INFIX OPERATOR std::`>=` (l: anytype, r: anytype); | test_edgeql_syntax_ddl_operator_07 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_cast_01(self):
"""
CREATE CAST FROM std::str TO std::bool {
SET volatility := 'Immutable';
USING SQL FUNCTION 'edgedb.str_to_bool';
};
""" | CREATE CAST FROM std::str TO std::bool {
SET volatility := 'Immutable';
USING SQL FUNCTION 'edgedb.str_to_bool';
}; | test_edgeql_syntax_ddl_cast_01 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_cast_02(self):
"""
CREATE CAST FROM std::bool TO std::str {
SET volatility := 'Immutable';
USING SQL CAST;
};
""" | CREATE CAST FROM std::bool TO std::str {
SET volatility := 'Immutable';
USING SQL CAST;
}; | test_edgeql_syntax_ddl_cast_02 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_cast_03(self):
"""
CREATE CAST FROM std::json TO std::bigint {
SET volatility := 'Stable';
USING SQL $$
SELECT edgedb.str_to_bigint(
edgedb.jsonb_extract_scalar(val, 'number', detail => detail)
);
$$;
};
""" | CREATE CAST FROM std::json TO std::bigint {
SET volatility := 'Stable';
USING SQL $$
SELECT edgedb.str_to_bigint(
edgedb.jsonb_extract_scalar(val, 'number', detail => detail)
);
$$;
}; | test_edgeql_syntax_ddl_cast_03 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_cast_04(self):
"""
CREATE CAST FROM std::int32 TO std::int64 {
SET volatility := 'Immutable';
USING SQL CAST;
ALLOW IMPLICIT;
};
""" | CREATE CAST FROM std::int32 TO std::int64 {
SET volatility := 'Immutable';
USING SQL CAST;
ALLOW IMPLICIT;
}; | test_edgeql_syntax_ddl_cast_04 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_cast_05(self):
"""
CREATE CAST FROM std::int64 TO std::int16 {
SET volatility := 'Immutable';
USING SQL CAST;
ALLOW ASSIGNMENT;
};
""" | CREATE CAST FROM std::int64 TO std::int16 {
SET volatility := 'Immutable';
USING SQL CAST;
ALLOW ASSIGNMENT;
}; | test_edgeql_syntax_ddl_cast_05 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_cast_06(self):
"""
CREATE CAST FROM std::BaseObject TO std::json {
SET volatility := 'Immutable';
USING SQL EXPRESSION;
};
""" | CREATE CAST FROM std::BaseObject TO std::json {
SET volatility := 'Immutable';
USING SQL EXPRESSION;
}; | test_edgeql_syntax_ddl_cast_06 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_cast_07(self):
"""
ALTER CAST FROM std::BaseObject TO std::json {
CREATE ANNOTATION description := 'json';
};
""" | ALTER CAST FROM std::BaseObject TO std::json {
CREATE ANNOTATION description := 'json';
}; | test_edgeql_syntax_ddl_cast_07 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_cast_08(self):
"""
DROP CAST FROM std::BaseObject TO std::json;
""" | DROP CAST FROM std::BaseObject TO std::json; | test_edgeql_syntax_ddl_cast_08 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_property_01(self):
"""
CREATE ABSTRACT PROPERTY std::property {
SET title := 'Base property';
};
""" | CREATE ABSTRACT PROPERTY std::property {
SET title := 'Base property';
}; | test_edgeql_syntax_ddl_property_01 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_property_02(self):
"""
CREATE ABSTRACT PROPERTY std::property {
SET title := 'Base property';
};
""" | CREATE ABSTRACT PROPERTY std::property {
SET title := 'Base property';
}; | test_edgeql_syntax_ddl_property_02 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_property_03(self):
"""
CREATE ABSTRACT PROPERTY PROPERTY std::property {
SET title := 'Base property';
};
""" | CREATE ABSTRACT PROPERTY PROPERTY std::property {
SET title := 'Base property';
}; | test_edgeql_syntax_ddl_property_03 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_property_04(self):
"""
CREATE ABSTRACT PROPERTY __type__ {
SET title := 'Base property';
};
""" | CREATE ABSTRACT PROPERTY __type__ {
SET title := 'Base property';
}; | test_edgeql_syntax_ddl_property_04 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_property_05(self):
# omit optional semicolons
"""
CREATE ABSTRACT PROPERTY std::property {
SET title := 'Base property'
}
% OK %
CREATE ABSTRACT PROPERTY std::property {
SET title := 'Base property';
};
""" | CREATE ABSTRACT PROPERTY std::property {
SET title := 'Base property'
}
% OK %
CREATE ABSTRACT PROPERTY std::property {
SET title := 'Base property';
}; | test_edgeql_syntax_ddl_property_05 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_property_06(self):
"""
ALTER ABSTRACT PROPERTY prop {
RESET default;
};
% OK %
ALTER ABSTRACT PROPERTY prop RESET default;
""" | ALTER ABSTRACT PROPERTY prop {
RESET default;
};
% OK %
ALTER ABSTRACT PROPERTY prop RESET default; | test_edgeql_syntax_ddl_property_06 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_property_07(self):
"""
create abstract property union;
alter abstract property union reset default;
drop abstract property union;
""" | create abstract property union;
alter abstract property union reset default;
drop abstract property union; | test_edgeql_syntax_ddl_property_07 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_link_01(self):
"""
create abstract link union;
alter abstract link union reset default;
drop abstract link union;
""" | create abstract link union;
alter abstract link union reset default;
drop abstract link union; | test_edgeql_syntax_ddl_link_01 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_module_01(self):
"""
CREATE MODULE foo;
CREATE MODULE foo.bar;
CREATE MODULE all.abstract.bar;
% OK %
CREATE MODULE foo;
CREATE MODULE `foo.bar`;
CREATE MODULE `all.abstract.bar`;
""" | CREATE MODULE foo;
CREATE MODULE foo.bar;
CREATE MODULE all.abstract.bar;
% OK %
CREATE MODULE foo;
CREATE MODULE `foo.bar`;
CREATE MODULE `all.abstract.bar`; | test_edgeql_syntax_ddl_module_01 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_module_02(self):
"""
CREATE MODULE __subject__;
""" | CREATE MODULE __subject__; | test_edgeql_syntax_ddl_module_02 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_module_03(self):
"""
CREATE MODULE __std__.a;
""" | CREATE MODULE __std__.a; | test_edgeql_syntax_ddl_module_03 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_module_04(self):
"""
CREATE MODULE a.__std__;
""" | CREATE MODULE a.__std__; | test_edgeql_syntax_ddl_module_04 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_module_05(self):
"""
CREATE MODULE `__std__`;
""" | CREATE MODULE `__std__`; | test_edgeql_syntax_ddl_module_05 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_module_06(self):
"""
CREATE MODULE foo IF NOT EXISTS;
""" | CREATE MODULE foo IF NOT EXISTS; | test_edgeql_syntax_ddl_module_06 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_01(self):
"""
CREATE ABSTRACT TYPE schema::Type EXTENDING schema::Object;
""" | CREATE ABSTRACT TYPE schema::Type EXTENDING schema::Object; | test_edgeql_syntax_ddl_type_01 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_02(self):
"""
CREATE TYPE schema::TypeElement {
CREATE REQUIRED LINK type: schema::Type;
CREATE REQUIRED LINK num: std::int64;
CREATE PROPERTY name: std::str {
EXTENDING foo, bar;
};
CREATE LINK lnk: schema::Type {
EXTENDING l1;
};
CREATE LINK lnk1: schema::Type {
EXTENDING l1, l2;
};
CREATE LINK lnk2: schema::Type {
EXTENDING l1, l2;
CREATE PROPERTY lnk2_prop: std::str;
CREATE PROPERTY lnk2_prop2: std::str {
EXTENDING foo;
};
};
};
""" | CREATE TYPE schema::TypeElement {
CREATE REQUIRED LINK type: schema::Type;
CREATE REQUIRED LINK num: std::int64;
CREATE PROPERTY name: std::str {
EXTENDING foo, bar;
};
CREATE LINK lnk: schema::Type {
EXTENDING l1;
};
CREATE LINK lnk1: schema::Type {
EXTENDING l1, l2;
};
CREATE LINK lnk2: schema::Type {
EXTENDING l1, l2;
CREATE PROPERTY lnk2_prop: std::str;
CREATE PROPERTY lnk2_prop2: std::str {
EXTENDING foo;
};
};
}; | test_edgeql_syntax_ddl_type_02 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_03(self):
"""
ALTER TYPE schema::Object {
CREATE MULTI LINK attributes -> schema::Attribute;
};
% OK %
ALTER TYPE schema::Object {
CREATE MULTI LINK attributes: schema::Attribute;
};
""" | ALTER TYPE schema::Object {
CREATE MULTI LINK attributes -> schema::Attribute;
};
% OK %
ALTER TYPE schema::Object {
CREATE MULTI LINK attributes: schema::Attribute;
}; | test_edgeql_syntax_ddl_type_03 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_04(self):
"""
CREATE TYPE mymod::Foo {
CREATE LINK bar0: mymod::Bar {
ON TARGET DELETE RESTRICT;
};
CREATE LINK bar1: mymod::Bar {
ON TARGET DELETE DELETE SOURCE;
};
CREATE LINK bar2: mymod::Bar {
ON TARGET DELETE ALLOW;
};
CREATE LINK bar3: mymod::Bar {
ON TARGET DELETE DEFERRED RESTRICT;
};
};
""" | CREATE TYPE mymod::Foo {
CREATE LINK bar0: mymod::Bar {
ON TARGET DELETE RESTRICT;
};
CREATE LINK bar1: mymod::Bar {
ON TARGET DELETE DELETE SOURCE;
};
CREATE LINK bar2: mymod::Bar {
ON TARGET DELETE ALLOW;
};
CREATE LINK bar3: mymod::Bar {
ON TARGET DELETE DEFERRED RESTRICT;
};
}; | test_edgeql_syntax_ddl_type_04 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_05(self):
"""
CREATE TYPE mymod::Foo {
CREATE SINGLE LINK foo: mymod::Foo;
CREATE MULTI LINK bar: mymod::Bar;
CREATE REQUIRED SINGLE LINK baz: mymod::Baz;
CREATE REQUIRED MULTI LINK spam: mymod::Spam;
};
""" | CREATE TYPE mymod::Foo {
CREATE SINGLE LINK foo: mymod::Foo;
CREATE MULTI LINK bar: mymod::Bar;
CREATE REQUIRED SINGLE LINK baz: mymod::Baz;
CREATE REQUIRED MULTI LINK spam: mymod::Spam;
}; | test_edgeql_syntax_ddl_type_05 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_06(self):
"""
CREATE TYPE mymod::Foo {
CREATE SINGLE PROPERTY foo: str;
CREATE MULTI PROPERTY bar: str;
CREATE REQUIRED SINGLE PROPERTY baz: str;
CREATE REQUIRED MULTI PROPERTY spam: str;
};
""" | CREATE TYPE mymod::Foo {
CREATE SINGLE PROPERTY foo: str;
CREATE MULTI PROPERTY bar: str;
CREATE REQUIRED SINGLE PROPERTY baz: str;
CREATE REQUIRED MULTI PROPERTY spam: str;
}; | test_edgeql_syntax_ddl_type_06 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_07(self):
"""
ALTER TYPE mymod::Foo {
ALTER PROPERTY foo {
SET SINGLE;
SET REQUIRED;
};
};
""" | ALTER TYPE mymod::Foo {
ALTER PROPERTY foo {
SET SINGLE;
SET REQUIRED;
};
}; | test_edgeql_syntax_ddl_type_07 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_08(self):
"""
ALTER TYPE mymod::Foo ALTER LINK foo {
SET MULTI;
SET OPTIONAL;
};
% OK %
ALTER TYPE mymod::Foo {
ALTER LINK foo {
SET MULTI;
SET OPTIONAL;
};
};
""" | ALTER TYPE mymod::Foo ALTER LINK foo {
SET MULTI;
SET OPTIONAL;
};
% OK %
ALTER TYPE mymod::Foo {
ALTER LINK foo {
SET MULTI;
SET OPTIONAL;
};
}; | test_edgeql_syntax_ddl_type_08 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_09(self):
# omit optional semicolons
"""
ALTER TYPE mymod::Foo ALTER LINK foo {
SET MULTI;
SET OPTIONAL
}
% OK %
ALTER TYPE mymod::Foo {
ALTER LINK foo {
SET MULTI;
SET OPTIONAL;
};
};
""" | ALTER TYPE mymod::Foo ALTER LINK foo {
SET MULTI;
SET OPTIONAL
}
% OK %
ALTER TYPE mymod::Foo {
ALTER LINK foo {
SET MULTI;
SET OPTIONAL;
};
}; | test_edgeql_syntax_ddl_type_09 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_10(self):
"""
ALTER TYPE mymod::Foo {
ALTER PROPERTY foo {
SET OWNED;
};
};
""" | ALTER TYPE mymod::Foo {
ALTER PROPERTY foo {
SET OWNED;
};
}; | test_edgeql_syntax_ddl_type_10 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_11(self):
"""
ALTER TYPE mymod::Foo {
ALTER PROPERTY foo {
DROP OWNED;
};
};
""" | ALTER TYPE mymod::Foo {
ALTER PROPERTY foo {
DROP OWNED;
};
}; | test_edgeql_syntax_ddl_type_11 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_12(self):
"""
CREATE TYPE Foo {
CREATE PROPERTY bar := 'something';
};
% OK %
CREATE TYPE Foo {
CREATE PROPERTY bar := ('something');
};
""" | CREATE TYPE Foo {
CREATE PROPERTY bar := 'something';
};
% OK %
CREATE TYPE Foo {
CREATE PROPERTY bar := ('something');
}; | test_edgeql_syntax_ddl_type_12 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_13(self):
"""
ALTER TYPE Foo {
ALTER PROPERTY bar {
RESET EXPRESSION;
RESET default;
};
};
""" | ALTER TYPE Foo {
ALTER PROPERTY bar {
RESET EXPRESSION;
RESET default;
};
}; | test_edgeql_syntax_ddl_type_13 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_14(self):
"""
ALTER TYPE Foo {
ALTER LINK bar {
RESET EXPRESSION;
RESET default;
};
};
""" | ALTER TYPE Foo {
ALTER LINK bar {
RESET EXPRESSION;
RESET default;
};
}; | test_edgeql_syntax_ddl_type_14 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_15(self):
"""
ALTER TYPE Foo {
ALTER LINK bar {
SET TYPE int64 USING (SELECT (.bar, 1));
};
};
""" | ALTER TYPE Foo {
ALTER LINK bar {
SET TYPE int64 USING (SELECT (.bar, 1));
};
}; | test_edgeql_syntax_ddl_type_15 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_16(self):
"""
ALTER TYPE Foo {
ALTER LINK bar {
SET REQUIRED USING (SELECT '123');
};
};
""" | ALTER TYPE Foo {
ALTER LINK bar {
SET REQUIRED USING (SELECT '123');
};
}; | test_edgeql_syntax_ddl_type_16 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_17(self):
"""
ALTER TYPE Foo {
ALTER LINK bar {
SET SINGLE USING (SELECT '123');
};
};
""" | ALTER TYPE Foo {
ALTER LINK bar {
SET SINGLE USING (SELECT '123');
};
}; | test_edgeql_syntax_ddl_type_17 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_18(self):
"""
ALTER TYPE Foo {
ALTER LINK bar {
RESET CARDINALITY USING (SELECT '123');
};
};
""" | ALTER TYPE Foo {
ALTER LINK bar {
RESET CARDINALITY USING (SELECT '123');
};
}; | test_edgeql_syntax_ddl_type_18 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_19(self):
"""
ALTER TYPE Foo {
CREATE PROPERTY bar: str {
USING (4);
};
};
""" | ALTER TYPE Foo {
CREATE PROPERTY bar: str {
USING (4);
};
}; | test_edgeql_syntax_ddl_type_19 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_20(self):
"""
ALTER TYPE Foo {
ALTER PROPERTY bar {
SET TYPE str;
USING (4);
};
};
""" | ALTER TYPE Foo {
ALTER PROPERTY bar {
SET TYPE str;
USING (4);
};
}; | test_edgeql_syntax_ddl_type_20 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_21(self):
"""
ALTER TYPE Foo {
CREATE LINK bar: Object {
USING (SELECT Object);
};
};
""" | ALTER TYPE Foo {
CREATE LINK bar: Object {
USING (SELECT Object);
};
}; | test_edgeql_syntax_ddl_type_21 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_22(self):
"""
ALTER TYPE Foo {
ALTER LINK bar {
SET TYPE Object;
USING (SELECT Object);
};
};
""" | ALTER TYPE Foo {
ALTER LINK bar {
SET TYPE Object;
USING (SELECT Object);
};
}; | test_edgeql_syntax_ddl_type_22 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_23(self):
"""
CREATE TYPE `123` {
CREATE PROPERTY `456`: str;
};
""" | CREATE TYPE `123` {
CREATE PROPERTY `456`: str;
}; | test_edgeql_syntax_ddl_type_23 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_24(self):
"""
ALTER TYPE mymod::Foo {
ALTER LINK union {
USING (SELECT Object);
};
ALTER PROPERTY except {
USING (1312);
};
};
""" | ALTER TYPE mymod::Foo {
ALTER LINK union {
USING (SELECT Object);
};
ALTER PROPERTY except {
USING (1312);
};
}; | test_edgeql_syntax_ddl_type_24 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_type_25(self):
"""
ALTER TYPE mymod::Foo {
DROP LINK union;
DROP PROPERTY except;
};
""" | ALTER TYPE mymod::Foo {
DROP LINK union;
DROP PROPERTY except;
}; | test_edgeql_syntax_ddl_type_25 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_set_command_01(self):
"""
SET MODULE default;
""" | SET MODULE default; | test_edgeql_syntax_set_command_01 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_set_command_02(self):
"""
SET ALIAS foo AS MODULE default;
""" | SET ALIAS foo AS MODULE default; | test_edgeql_syntax_set_command_02 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_set_command_03(self):
"""
SET MODULE default;
""" | SET MODULE default; | test_edgeql_syntax_set_command_03 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_set_command_04(self):
# Old and no longer supported syntax that allowed to
# specify multiple comma-separated SET subcommands.
"""
SET ALIAS foo AS MODULE foo1, ALIAS bar AS MODULE foo2;
""" | SET ALIAS foo AS MODULE foo1, ALIAS bar AS MODULE foo2; | test_edgeql_syntax_set_command_04 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_reset_command_01(self):
"""
RESET MODULE;
RESET ALIAS foo;
RESET ALIAS *;
""" | RESET MODULE;
RESET ALIAS foo;
RESET ALIAS *; | test_edgeql_syntax_reset_command_01 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_configure_01(self):
"""
CONFIGURE INSTANCE SET foo := (SELECT User);
CONFIGURE SESSION SET foo := (SELECT User);
CONFIGURE CURRENT BRANCH SET foo := (SELECT User);
CONFIGURE INSTANCE SET cfg::foo := (SELECT User);
CONFIGURE SESSION SET cfg::foo := (SELECT User);
CONFIGURE CURRENT BRANCH SET cfg::foo := (SELECT User);
CONFIGURE INSTANCE RESET foo;
CONFIGURE SESSION RESET foo;
CONFIGURE CURRENT BRANCH RESET foo;
CONFIGURE INSTANCE RESET cfg::foo;
CONFIGURE SESSION RESET cfg::foo;
CONFIGURE CURRENT BRANCH RESET cfg::foo;
CONFIGURE INSTANCE INSERT Foo {bar := (SELECT 1)};
CONFIGURE SESSION INSERT Foo {bar := (SELECT 1)};
CONFIGURE CURRENT BRANCH INSERT Foo {bar := (SELECT 1)};
CONFIGURE INSTANCE INSERT cfg::Foo {bar := (SELECT 1)};
CONFIGURE SESSION INSERT cfg::Foo {bar := (SELECT 1)};
CONFIGURE CURRENT BRANCH INSERT cfg::Foo {bar := (SELECT 1)};
CONFIGURE INSTANCE RESET Foo FILTER (.bar = 2);
CONFIGURE SESSION RESET Foo FILTER (.bar = 2);
CONFIGURE CURRENT BRANCH RESET Foo FILTER (.bar = 2);
""" | CONFIGURE INSTANCE SET foo := (SELECT User);
CONFIGURE SESSION SET foo := (SELECT User);
CONFIGURE CURRENT BRANCH SET foo := (SELECT User);
CONFIGURE INSTANCE SET cfg::foo := (SELECT User);
CONFIGURE SESSION SET cfg::foo := (SELECT User);
CONFIGURE CURRENT BRANCH SET cfg::foo := (SELECT User);
CONFIGURE INSTANCE RESET foo;
CONFIGURE SESSION RESET foo;
CONFIGURE CURRENT BRANCH RESET foo;
CONFIGURE INSTANCE RESET cfg::foo;
CONFIGURE SESSION RESET cfg::foo;
CONFIGURE CURRENT BRANCH RESET cfg::foo;
CONFIGURE INSTANCE INSERT Foo {bar := (SELECT 1)};
CONFIGURE SESSION INSERT Foo {bar := (SELECT 1)};
CONFIGURE CURRENT BRANCH INSERT Foo {bar := (SELECT 1)};
CONFIGURE INSTANCE INSERT cfg::Foo {bar := (SELECT 1)};
CONFIGURE SESSION INSERT cfg::Foo {bar := (SELECT 1)};
CONFIGURE CURRENT BRANCH INSERT cfg::Foo {bar := (SELECT 1)};
CONFIGURE INSTANCE RESET Foo FILTER (.bar = 2);
CONFIGURE SESSION RESET Foo FILTER (.bar = 2);
CONFIGURE CURRENT BRANCH RESET Foo FILTER (.bar = 2); | test_edgeql_syntax_configure_01 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_configure_02(self):
"""
CONFIGURE DATABASE SET foo := (SELECT User);
""" | CONFIGURE DATABASE SET foo := (SELECT User); | test_edgeql_syntax_configure_02 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_configure_03(self):
"""
configure database set foo := (SELECT User);
""" | configure database set foo := (SELECT User); | test_edgeql_syntax_configure_03 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_alias_01(self):
"""
CREATE ALIAS Foo := (SELECT User);
""" | CREATE ALIAS Foo := (SELECT User); | test_edgeql_syntax_ddl_alias_01 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_alias_02(self):
"""
CREATE ALIAS Foo {
USING (SELECT User);
};
ALTER ALIAS Foo
USING (SELECT Person);
DROP ALIAS Foo;
% OK %
CREATE ALIAS Foo := (SELECT User);
ALTER ALIAS Foo
USING (SELECT Person);
DROP ALIAS Foo;
""" | CREATE ALIAS Foo {
USING (SELECT User);
};
ALTER ALIAS Foo
USING (SELECT Person);
DROP ALIAS Foo;
% OK %
CREATE ALIAS Foo := (SELECT User);
ALTER ALIAS Foo
USING (SELECT Person);
DROP ALIAS Foo; | test_edgeql_syntax_ddl_alias_02 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_alias_03(self):
"""
CREATE ALIAS Foo := User;
% OK %
CREATE ALIAS Foo := (User);
""" | CREATE ALIAS Foo := User;
% OK %
CREATE ALIAS Foo := (User); | test_edgeql_syntax_ddl_alias_03 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_01(self):
"""
CREATE TYPE Foo {
CREATE INDEX ON (.title);
CREATE INDEX ON (SELECT __subject__.title);
CREATE INDEX ON (.foo) EXCEPT (.bar);
};
""" | CREATE TYPE Foo {
CREATE INDEX ON (.title);
CREATE INDEX ON (SELECT __subject__.title);
CREATE INDEX ON (.foo) EXCEPT (.bar);
}; | test_edgeql_syntax_ddl_index_01 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_02(self):
"""
ALTER TYPE Foo {
DROP INDEX ON (.title);
CREATE INDEX ON (.title) {
CREATE ANNOTATION system := 'Foo';
};
ALTER INDEX ON (.title) {
ALTER ANNOTATION system := 'Foo';
};
ALTER INDEX ON (.title) {
DROP ANNOTATION system;
};
DROP INDEX ON (.foo) EXCEPT (.bar);
ALTER INDEX ON (.foo) EXCEPT (.bar) {
DROP ANNOTATION system;
};
};
""" | ALTER TYPE Foo {
DROP INDEX ON (.title);
CREATE INDEX ON (.title) {
CREATE ANNOTATION system := 'Foo';
};
ALTER INDEX ON (.title) {
ALTER ANNOTATION system := 'Foo';
};
ALTER INDEX ON (.title) {
DROP ANNOTATION system;
};
DROP INDEX ON (.foo) EXCEPT (.bar);
ALTER INDEX ON (.foo) EXCEPT (.bar) {
DROP ANNOTATION system;
};
}; | test_edgeql_syntax_ddl_index_02 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_03(self):
"""
ALTER TYPE Foo {
ALTER INDEX ON (.title) {
CREATE ANNOTATION system := 'Foo'
};
ALTER INDEX ON (.title) {
DROP ANNOTATION system
};
};
% OK %
ALTER TYPE Foo {
ALTER INDEX ON (.title) {
CREATE ANNOTATION system := 'Foo';
};
ALTER INDEX ON (.title) {
DROP ANNOTATION system;
};
};
""" | ALTER TYPE Foo {
ALTER INDEX ON (.title) {
CREATE ANNOTATION system := 'Foo'
};
ALTER INDEX ON (.title) {
DROP ANNOTATION system
};
};
% OK %
ALTER TYPE Foo {
ALTER INDEX ON (.title) {
CREATE ANNOTATION system := 'Foo';
};
ALTER INDEX ON (.title) {
DROP ANNOTATION system;
};
}; | test_edgeql_syntax_ddl_index_03 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_04(self):
"""
CREATE TYPE Foo {
CREATE INDEX pg::gist ON (.title);
};
""" | CREATE TYPE Foo {
CREATE INDEX pg::gist ON (.title);
}; | test_edgeql_syntax_ddl_index_04 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_05(self):
"""
CREATE TYPE Foo {
CREATE INDEX myindex0() ON (.bar);
CREATE INDEX myindex1(a := 13, b := 'ab', conf := [4, 3, 2])
ON (.baz);
CREATE INDEX myindex2(num := 13, val := 'ab')
ON (.foo);
};
% OK %
CREATE TYPE Foo {
CREATE INDEX myindex0 ON (.bar);
CREATE INDEX myindex1(a := 13, b := 'ab', conf := [4, 3, 2])
ON (.baz);
CREATE INDEX myindex2(num := 13, val := 'ab')
ON (.foo);
};
""" | CREATE TYPE Foo {
CREATE INDEX myindex0() ON (.bar);
CREATE INDEX myindex1(a := 13, b := 'ab', conf := [4, 3, 2])
ON (.baz);
CREATE INDEX myindex2(num := 13, val := 'ab')
ON (.foo);
};
% OK %
CREATE TYPE Foo {
CREATE INDEX myindex0 ON (.bar);
CREATE INDEX myindex1(a := 13, b := 'ab', conf := [4, 3, 2])
ON (.baz);
CREATE INDEX myindex2(num := 13, val := 'ab')
ON (.foo);
}; | test_edgeql_syntax_ddl_index_05 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_06(self):
"""
CREATE ABSTRACT INDEX myindex0;
""" | CREATE ABSTRACT INDEX myindex0; | test_edgeql_syntax_ddl_index_06 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_07(self):
"""
CREATE ABSTRACT INDEX myindex1(conf: str = 'special');
CREATE ABSTRACT INDEX myindex2(val: int64);
CREATE ABSTRACT INDEX myindex3(a: int64, b: str = 'default')
USING myindex2(val := a),
myindex1(conf := b),
myindex1;
""" | CREATE ABSTRACT INDEX myindex1(conf: str = 'special');
CREATE ABSTRACT INDEX myindex2(val: int64);
CREATE ABSTRACT INDEX myindex3(a: int64, b: str = 'default')
USING myindex2(val := a),
myindex1(conf := b),
myindex1; | test_edgeql_syntax_ddl_index_07 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_08(self):
"""
CREATE ABSTRACT INDEX myindex1 EXTENDING fts;
CREATE ABSTRACT INDEX myindex2(conf := 'test') EXTENDING fts;
""" | CREATE ABSTRACT INDEX myindex1 EXTENDING fts;
CREATE ABSTRACT INDEX myindex2(conf := 'test') EXTENDING fts; | test_edgeql_syntax_ddl_index_08 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_09(self):
"""
ALTER ABSTRACT INDEX myindex0 {
DROP ANNOTATION system;
};
""" | ALTER ABSTRACT INDEX myindex0 {
DROP ANNOTATION system;
}; | test_edgeql_syntax_ddl_index_09 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_10(self):
"""
DROP ABSTRACT INDEX myindex0;
""" | DROP ABSTRACT INDEX myindex0; | test_edgeql_syntax_ddl_index_10 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_11(self):
"""
CREATE ABSTRACT INDEX std::btree ON anytype {
USING SQL $$hash ((%) NULLS FIRST)$$;
};
""" | CREATE ABSTRACT INDEX std::btree ON anytype {
USING SQL $$hash ((%) NULLS FIRST)$$;
}; | test_edgeql_syntax_ddl_index_11 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_12(self):
"""
CREATE TYPE Foo {
CREATE DEFERRED INDEX myindex0 ON (.bar);
CREATE DEFERRED INDEX
myindex1(a := 13, b := 'ab', conf := [4, 3, 2]) ON (.baz);
CREATE DEFERRED INDEX myindex2(num := 13, val := 'ab')
ON (.foo);
CREATE DEFERRED INDEX ON (.bar);
};
""" | CREATE TYPE Foo {
CREATE DEFERRED INDEX myindex0 ON (.bar);
CREATE DEFERRED INDEX
myindex1(a := 13, b := 'ab', conf := [4, 3, 2]) ON (.baz);
CREATE DEFERRED INDEX myindex2(num := 13, val := 'ab')
ON (.foo);
CREATE DEFERRED INDEX ON (.bar);
}; | test_edgeql_syntax_ddl_index_12 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_index_13(self):
"""
ALTER TYPE Foo {
ALTER INDEX myindex0 ON (.bar) SET DEFERRED;
ALTER INDEX ON (.bar) DROP DEFERRED;
};
""" | ALTER TYPE Foo {
ALTER INDEX myindex0 ON (.bar) SET DEFERRED;
ALTER INDEX ON (.bar) DROP DEFERRED;
}; | test_edgeql_syntax_ddl_index_13 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_global_01(self):
"""
CREATE GLOBAL Foo := (SELECT User);
""" | CREATE GLOBAL Foo := (SELECT User); | test_edgeql_syntax_ddl_global_01 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
def test_edgeql_syntax_ddl_global_02(self):
"""
CREATE GLOBAL foo -> str;
""" | CREATE GLOBAL foo -> str; | test_edgeql_syntax_ddl_global_02 | python | geldata/gel | tests/test_edgeql_syntax.py | https://github.com/geldata/gel/blob/master/tests/test_edgeql_syntax.py | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.