CREATE [ABSTRACT] TYPE Identifier [EXTENDS Identifier] [ATTRIBUTES(AttrIdentifier          Integer, UnsignedInteger, Double, String, Boolean, DateTime, BackwardEdge, List<Primitive-
[=DefaultValue])] [BACKWARDEDGES(BackwardEdge [,BackwardEdge])] [UNIQUE(Identifier         Datatype>, Set<Userdefined-Datatype>
[,Identifier])] [MANDATORY(Identifier [,Identifier])] [INDICES(IndexOptOnCreateType)]

                                                                                           COUNT | AVG | MIN | MAX | SUM
CREATE TYPES [[ABSTRACT] bulk_type_list_member] [,[ABSTRACT]bulk_type_list_member]]

                                                                                           CONCAT | TOUPPER | MAXWEIGHT | SUBSTRING | TOP | CURRENTDATE
ALTER   TYPE   Identifier   ADD ATTRIBUTES(attr_definition [,attr_definition])|
ALTER   TYPE   Identifier   DROP ATTRIBUTES (Identifier [,Identifier]) |
ALTER   TYPE   Identifier   ADD BACKWARDEDGES (BackwardEdge [,BackwardEdge]) |             Comments within lines start with /* and end with */
ALTER   TYPE   Identifier   DROP BACKWARDEDGES (Identifier [,Identifier]) |
ALTER   TYPE   Identifier   RENAME ATTRIBUTE Identifier TO Identifier |
ALTER   TYPE   Identifier   RENAME TO Identifier |                                         DESCRIBE INDICES | DESCRIBE INDEX Identifier [edition] |
ALTER   TYPE   Identifier   RENAME BACKWARDEDGE Identifier TO Identifier |                 DESCRIBE EDGES | DESCRIBE EDGE Identifier |
ALTER   TYPE   Identifier   UNIQUE (Identifier [,Identifier]) |                            DESCRIBE FUNCTIONS | DESCRIBE FUNCTION Identifier |
ALTER   TYPE   Identifier   DROP UNIQUE                                                    DESCRIBE AGGREGATES | DESCRIBE AGGREGATE Identifier |
                                                                                           DESCRIBE SETTINGS [ON TYPE TypeIdentifier | ON ATTRIBUTE attr_definition | ON DB | ON
                                                                                           SESSION] | DESCRIBE SETTING Identifier [ON TYPE TypeIdentifier | ON ATTRIBUTE attr_definition
DROP TYPE Identifier                                                                       | ON DB | ON SESSION] |
                                                                                           DESCRIBE TYPES | DESCRIBE TYPE TypeIdentifier

TRUNCATE Identifier
                                                                                           SETTING DB SettingOperation (= SET ("SettingName"=value [,"SettingName"=value]) | GET           <sones version="1.0">
                                                                                           ("SettingName" [,"SettingName"]) | REMOVE ("SettingName" [,"SettingName"])                         <GraphDB version="1.0">
CREATE INDEX identifier [EDITION identifier] ON identifier (index_attribute_list)          SETTING SESSION SettingOperation | SETTING TYPE Identifier SettingOperation |
[INDEXTYPE Identifier]                                                                                                                                                                           <queryresult version="1.0">
                                                                                           SETTING ATTRIBUTE Identifier SettingOperation
                                                                                           SettingName = (DEPTH, SETREADONLY, TYPE, UUID, SHOWREVISION, SELECTTIMEOUT)
                                                                                                                                                                                                     <query>FROM UserProfile u SELECT *</query>
                                                                                                                                                                                                     <result>Successful</result>
REBUILD INDICES                                                                                                                                                                                      <duration resolution="ms">1</duration>
REBUILD INDICES TypeIdentifier [,TypeIdentifier]                                           DUMP [{GDDL|GDML|ALL}] [AS {GQL,CSV}]                                                                     <warnings />
                                                                                                                                                                                                     <errors />
FROM Identifier DROP INDEX IndexIdentifier [EDITION EditionIdentifier]
                                                                                           FROM Identifier alias [,Identifier Alias] SELECT * | selection_list
                                                                                                                                                                                                     <results>
                                                                                           [WHERE where_condition] [GROUP BY group_expr] [ORDER BY order_expr] [OFFSET offset_expr]                     <DBObject>
                                                                                           [LIMIT limit_expr] [DEPTH depth_expr]                                                                           <attribute name="Username" type="String">User1</attribute>
INSERT INTO Identifier VALUES (AttrAssign [,AttrAssign]) [WHERE where_condition]
                                                                                                                                                                                                           <attribute name="Age" type="Int64">25</attribute>
AttrAssign = [idNode=Value]|[idNode={REF(..),REFUUID(..),SETOF(..),LISTOF(..),SETOFUUIDS                                                                                                                </DBObject>
(..)}                                                                                                                                                                                                </results>
                                                                                                                                                                                                 </queryresult>
INSERTORUPDATE Identifier VALUES (AttrAssign [,AttrAssign]) [WHERE where_condition]                                                                                                           </GraphDB>
                                                                                                                „describe type“ command (URL encoded)                                      </sones>

INSERTORREPLACE Identifier VALUES (AttrAssign [,AttrAssign]) [WHERE where_condition]


                                                                                                       GET /gql?describe%20types HTTP/1.1
UPDATE Identifier SET (update_attr_element [,update_attr_element]) [WHERE
                                                                                                       Host: databaseserver.domain                            Server-Hostname              {
where_condition]
                                                                                                       Accept: application/json; utf-8                                                         "query": "FROM User u SELECT *",
                                                                                                                                                                                               "result": "Successful",
REPLACE Identifier VALUES (AttrAssign [,AttrAssign]) WHERE where_condition                                                                                                                     "warnings": [],
                                                                                                                                                                                               "errors": [],
                                                                                                    application/json       application/xml       text/plain      text/html
FROM Identifier DELETE [id] [WHERE where_condition]
                                                                                                                                                                                               "results":
                                                                                                                                                                                               [{
                                                                                                                                                                                                "Username": "User1",
BEGIN [DISTRIBUTED] | [LONG-RUNNING] | [DISTRIBUTED LONG-RUNNING] TRANSACTION [ISOLATION                                                                                                        "Age": "25"
                                                                                                     GET /Logfile
= {Full | Read | Write}] [Name=transaction_name] [TIMESTAMPE=transaction_timestamp]
                                                                                                                                                                                                }],
                                                                                                                                                                                               "Duration": ["1","ms"]
COMMIT TRANSACTION [Name=transaction_name] [ASYNC]                                                                                                                                         }


ROLLBACK TRANSACTION [Name=transaction_name] [ASYNC]
CREATE TYPE                                                                               INSERT INTO
   UserProfile ATTRIBUTES (String Username, Integer Age, SET<UserProfile> Friends)           UserProfile VALUES (Name = "User1", Age = 25)
   BACKWARDEDGES (UserProfile.Friends FriendOf)                                           INSERT INTO
   UNIQUE (Username)                                                                         UserProfile VALUES (Name = "User2", Age = 22, Friends = SETOF(Name = "User1"))
   MANDATORY (Username)                                                                   INSERT INTO
CREATE TYPE                                                                                  UserProfile VALUES (Name = "User3" Father = REF(Name = "User1"), Enemies = SETOF(Name = "User2"))
   SecondUserProfile EXTENDS UserProfile ATTRIBUTES (SET<UserProfile> Enemies)            INSERT INTO
CREATE TYPE
                                                                                             UserProfile VALUES (Name = "User4", WeightedFriends = SETOF(Name = "User1":(1.2)))
   ThirdUserProfile EXTENDS UserProfile ATTRIBUTES (LIST<String> Hobbies)
                                                                                          INSERT INTO
                                                                                             ThirdUserProfile VALUES (Name = "User5", Hobbies = LISTOF("Books","Music"))
                                                                                          INSERT INTO
CREATE TYPES                                                                                 UserProfile VALUES (Name = "UndefinedAttributeUser", Weight = 70.1) /* Undefined Attribute */
    Tag ATTRIBUTES (String Name) BACKWARDEDGES (Website.Tags TaggedSite) INDICES (Name)
    Website ATTRIBUTES (String Name, String URL, SET<Tag> Tags) INDICES (Name)

                                                                                          FROM UserProfile U SELECT U.Friends.Friends.Name WHERE U.Name = "User1"
                                                                                          FROM UserProfile U SELECT U.Name WHERE U.Friends.Friends.Name = "User1"
ALTER TYPE
                                                                                          FROM UserProfile U SELECT U.Friends.Count()
    UserProfile ADD ATTRIBUTES (SET<UserProfile> Enemies, UserProfile Father)
ALTER TYPE
    UserProfile ADD BACKWARDEDGES (UserProfile.Enemies EnemyOf)
ALTER TYPE
    UserProfile ADD ATTRIBUTES (SET<WEIGHTED(Double, DEFAULT = 1.5, SORTED = DESC)                                                                                  FROM UserProfile U
    <UserProfile>> WeightedFriends )                                                      DESCRIBE   TYPES                                                             SELECT U.Name.CONCAT("-> Age:", U.Age) AS "Name"
                                                                                          DESCRIBE   TYPE UserProfile                                               FROM UserProfile U
                                                                                          DESCRIBE   SETTING Depth ON TYPE UserProfile                                 SELECT U.Name, CURRENTDATE()
                                                                                          DESCRIBE   SETTING Depth ON ATTRIBUTE UserProfile.Friends                 FROM UserProfile U
DROP TYPE SecondUserProfile                                                               DESCRIBE   SETTINGS ON DB                                                    SELECT U.WeightedFriends.MAXWEIGHT()
                                                                                          DESCRIBE   INDEX Tag.Name                                                 FROM UserProfile U
                                                                                          DESCRIBE   FUNCTION CONCAT                                                   SELECT U.Name.SUBSTRING(2,3)
                                                                                                                                                                    FROM UserProfile U
FROM UserProfile DROP INDEX IDX_Name                                                                                                                                   SELECT U.Friends.Path(S.Name = "User1", 10, 10, "true", "false")
                                                                                                                                                                       WHERE U.Name = "User2" DEPTH 1
                                                                                          SETTING TYPE User SET („DEPTH“=2)

CREATE INDEX
    IDX_Name ON UserProfile(Name) INDEXTYPE Hashtable                                                                                                               FROM UserProfile U
                                                                                                                                                                       SELECT AVG(U.Age)
                                                                                          UPDATE                                                                    FROM UserProfile U
                                                                                             UserProfile SET (Friends += SETOF(Name="User2", Name="User4")             SELECT AVG(U.Age), U.Name
TRUNCATE UserProfile                                                                         WHERE Name = "User3"                                                      GROUP BY U.Name
                                                                                                                                                                       OFFSET 10
                                                                                                                                                                       LIMIT 10

INSERTORUPDATE                                                                            REPLACE
    UserProfile VALUES (Name = "User1", Age = 40) WHERE Name = "User1"                       UserProfile VALUES (Name = "User1", Age = 50)
INSERTORUPDATE                                                                               WHERE Name= "User1-new"
    UserProfile VALUES (Name = "User5") WHERE Name = "User5"


                                                                                          FROM UserProfile DELETE WHERE Name = "User1"
INSERTORREPLACE
   UserProfile VALUES (Name = "User1-new", Age = 50) WHERE Name = "User1"

More Related Content

PDF
GQL cheat sheet latest
PDF
Dig Deeper into WordPress - WD Meetup Cairo
PPTX
HTML Form Part 1
PDF
Transparent Object Persistence with FLOW3
PPTX
Build your own entity with Drupal
PDF
XStream
PDF
Transparent Object Persistence with FLOW3
PDF
4Developers 2018: Structuring React components (Bartłomiej Witczak)
GQL cheat sheet latest
Dig Deeper into WordPress - WD Meetup Cairo
HTML Form Part 1
Transparent Object Persistence with FLOW3
Build your own entity with Drupal
XStream
Transparent Object Persistence with FLOW3
4Developers 2018: Structuring React components (Bartłomiej Witczak)

What's hot (20)

PDF
Structuring React.js Components
PDF
Type safe embedded domain-specific languages
PDF
Introduction to Active Record - Silicon Valley Ruby Conference 2007
PPTX
DOM and Events
PPTX
J query1
PDF
Modern Application Foundations: Underscore and Twitter Bootstrap
PPTX
An introduction to javascript
PPT
J query
PDF
Mpg Dec07 Gian Lorenzetto
PDF
Web 6 | JavaScript DOM
PDF
Doctrator Symfony Live 2011 San Francisco
KEY
Backbone js
KEY
Why ruby
KEY
Ruby/Rails
PDF
Your Entity, Your Code
PDF
Юрий Буянов «Squeryl — ORM с человеческим лицом»
PPT
Introduction to hibernate
PDF
Drupal Entities - Emerging Patterns of Usage
PPTX
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
PDF
Drupal & javascript
Structuring React.js Components
Type safe embedded domain-specific languages
Introduction to Active Record - Silicon Valley Ruby Conference 2007
DOM and Events
J query1
Modern Application Foundations: Underscore and Twitter Bootstrap
An introduction to javascript
J query
Mpg Dec07 Gian Lorenzetto
Web 6 | JavaScript DOM
Doctrator Symfony Live 2011 San Francisco
Backbone js
Why ruby
Ruby/Rails
Your Entity, Your Code
Юрий Буянов «Squeryl — ORM с человеческим лицом»
Introduction to hibernate
Drupal Entities - Emerging Patterns of Usage
SenchaCon 2016: Handle Real-World Data with Confidence - Fredric Berling
Drupal & javascript
Ad

Similar to GQL CheatSheet 1.1 (20)

PPTX
SQL Server Development Tools & Processes Using Visual Studio 2010
PDF
Introducción rápida a SQL
PPTX
TechDays Tunisia - Visual Studio & SQL Server, Better Together - Ayman El-Hattab
ODT
PDF
Database & Technology 1 _ Clancy Bufton _ Flashback Query - oracle total reca...
PDF
rails-migrations_1
PDF
Connor McDonald 11g for developers
PDF
Fosdem 2012 practical_indexing
TXT
20150730 Sql AutoCommannotator - sac v2
KEY
Active Record Association (2), Season 2
PPTX
SQL techniques for faster applications
PDF
Explaining the MySQL Explain
PDF
Indexierung mit MySQL
PPTX
Sangam 18 - Great Applications with Great SQL
PPTX
Perth APAC Groundbreakers tour - SQL Techniques
PDF
iBATIS
PDF
Find it. Fix it. Real-World SQL Tuning Cases with Karen Morton
PDF
Access presentation
PDF
20110514 mongo dbチューニング
PPTX
Centralized Server Manager
 
SQL Server Development Tools & Processes Using Visual Studio 2010
Introducción rápida a SQL
TechDays Tunisia - Visual Studio & SQL Server, Better Together - Ayman El-Hattab
Database & Technology 1 _ Clancy Bufton _ Flashback Query - oracle total reca...
rails-migrations_1
Connor McDonald 11g for developers
Fosdem 2012 practical_indexing
20150730 Sql AutoCommannotator - sac v2
Active Record Association (2), Season 2
SQL techniques for faster applications
Explaining the MySQL Explain
Indexierung mit MySQL
Sangam 18 - Great Applications with Great SQL
Perth APAC Groundbreakers tour - SQL Techniques
iBATIS
Find it. Fix it. Real-World SQL Tuning Cases with Karen Morton
Access presentation
20110514 mongo dbチューニング
Centralized Server Manager
 
Ad

More from sones GmbH (6)

PDF
sones company presentation
PPTX
sones NoSQL GraphDatenbank für Bilderportale
PDF
sones auf windows azure whitepaper (german)
PDF
sones on windows azure whitepaper (english)
PDF
Whitepaper sones GraphDB (ger)
PDF
Whitepaper sones GraphDB (eng)
sones company presentation
sones NoSQL GraphDatenbank für Bilderportale
sones auf windows azure whitepaper (german)
sones on windows azure whitepaper (english)
Whitepaper sones GraphDB (ger)
Whitepaper sones GraphDB (eng)

Recently uploaded (20)

PPTX
Tartificialntelligence_presentation.pptx
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Getting Started with Data Integration: FME Form 101
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
STKI Israel Market Study 2025 version august
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPT
What is a Computer? Input Devices /output devices
PDF
Five Habits of High-Impact Board Members
PDF
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
PPTX
Modernising the Digital Integration Hub
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Enhancing emotion recognition model for a student engagement use case through...
Tartificialntelligence_presentation.pptx
NewMind AI Weekly Chronicles – August ’25 Week III
A comparative study of natural language inference in Swahili using monolingua...
Getting Started with Data Integration: FME Form 101
Assigned Numbers - 2025 - Bluetooth® Document
Zenith AI: Advanced Artificial Intelligence
STKI Israel Market Study 2025 version august
Chapter 5: Probability Theory and Statistics
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
What is a Computer? Input Devices /output devices
Five Habits of High-Impact Board Members
TrustArc Webinar - Click, Consent, Trust: Winning the Privacy Game
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Final SEM Unit 1 for mit wpu at pune .pptx
Modernising the Digital Integration Hub
sustainability-14-14877-v2.pddhzftheheeeee
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Getting started with AI Agents and Multi-Agent Systems
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Enhancing emotion recognition model for a student engagement use case through...

GQL CheatSheet 1.1

  • 1. CREATE [ABSTRACT] TYPE Identifier [EXTENDS Identifier] [ATTRIBUTES(AttrIdentifier Integer, UnsignedInteger, Double, String, Boolean, DateTime, BackwardEdge, List<Primitive- [=DefaultValue])] [BACKWARDEDGES(BackwardEdge [,BackwardEdge])] [UNIQUE(Identifier Datatype>, Set<Userdefined-Datatype> [,Identifier])] [MANDATORY(Identifier [,Identifier])] [INDICES(IndexOptOnCreateType)] COUNT | AVG | MIN | MAX | SUM CREATE TYPES [[ABSTRACT] bulk_type_list_member] [,[ABSTRACT]bulk_type_list_member]] CONCAT | TOUPPER | MAXWEIGHT | SUBSTRING | TOP | CURRENTDATE ALTER TYPE Identifier ADD ATTRIBUTES(attr_definition [,attr_definition])| ALTER TYPE Identifier DROP ATTRIBUTES (Identifier [,Identifier]) | ALTER TYPE Identifier ADD BACKWARDEDGES (BackwardEdge [,BackwardEdge]) | Comments within lines start with /* and end with */ ALTER TYPE Identifier DROP BACKWARDEDGES (Identifier [,Identifier]) | ALTER TYPE Identifier RENAME ATTRIBUTE Identifier TO Identifier | ALTER TYPE Identifier RENAME TO Identifier | DESCRIBE INDICES | DESCRIBE INDEX Identifier [edition] | ALTER TYPE Identifier RENAME BACKWARDEDGE Identifier TO Identifier | DESCRIBE EDGES | DESCRIBE EDGE Identifier | ALTER TYPE Identifier UNIQUE (Identifier [,Identifier]) | DESCRIBE FUNCTIONS | DESCRIBE FUNCTION Identifier | ALTER TYPE Identifier DROP UNIQUE DESCRIBE AGGREGATES | DESCRIBE AGGREGATE Identifier | DESCRIBE SETTINGS [ON TYPE TypeIdentifier | ON ATTRIBUTE attr_definition | ON DB | ON SESSION] | DESCRIBE SETTING Identifier [ON TYPE TypeIdentifier | ON ATTRIBUTE attr_definition DROP TYPE Identifier | ON DB | ON SESSION] | DESCRIBE TYPES | DESCRIBE TYPE TypeIdentifier TRUNCATE Identifier SETTING DB SettingOperation (= SET ("SettingName"=value [,"SettingName"=value]) | GET <sones version="1.0"> ("SettingName" [,"SettingName"]) | REMOVE ("SettingName" [,"SettingName"]) <GraphDB version="1.0"> CREATE INDEX identifier [EDITION identifier] ON identifier (index_attribute_list) SETTING SESSION SettingOperation | SETTING TYPE Identifier SettingOperation | [INDEXTYPE Identifier] <queryresult version="1.0"> SETTING ATTRIBUTE Identifier SettingOperation SettingName = (DEPTH, SETREADONLY, TYPE, UUID, SHOWREVISION, SELECTTIMEOUT) <query>FROM UserProfile u SELECT *</query> <result>Successful</result> REBUILD INDICES <duration resolution="ms">1</duration> REBUILD INDICES TypeIdentifier [,TypeIdentifier] DUMP [{GDDL|GDML|ALL}] [AS {GQL,CSV}] <warnings /> <errors /> FROM Identifier DROP INDEX IndexIdentifier [EDITION EditionIdentifier] FROM Identifier alias [,Identifier Alias] SELECT * | selection_list <results> [WHERE where_condition] [GROUP BY group_expr] [ORDER BY order_expr] [OFFSET offset_expr] <DBObject> [LIMIT limit_expr] [DEPTH depth_expr] <attribute name="Username" type="String">User1</attribute> INSERT INTO Identifier VALUES (AttrAssign [,AttrAssign]) [WHERE where_condition] <attribute name="Age" type="Int64">25</attribute> AttrAssign = [idNode=Value]|[idNode={REF(..),REFUUID(..),SETOF(..),LISTOF(..),SETOFUUIDS </DBObject> (..)} </results> </queryresult> INSERTORUPDATE Identifier VALUES (AttrAssign [,AttrAssign]) [WHERE where_condition] </GraphDB> „describe type“ command (URL encoded) </sones> INSERTORREPLACE Identifier VALUES (AttrAssign [,AttrAssign]) [WHERE where_condition] GET /gql?describe%20types HTTP/1.1 UPDATE Identifier SET (update_attr_element [,update_attr_element]) [WHERE Host: databaseserver.domain Server-Hostname { where_condition] Accept: application/json; utf-8 "query": "FROM User u SELECT *", "result": "Successful", REPLACE Identifier VALUES (AttrAssign [,AttrAssign]) WHERE where_condition "warnings": [], "errors": [], application/json application/xml text/plain text/html FROM Identifier DELETE [id] [WHERE where_condition] "results": [{ "Username": "User1", BEGIN [DISTRIBUTED] | [LONG-RUNNING] | [DISTRIBUTED LONG-RUNNING] TRANSACTION [ISOLATION "Age": "25" GET /Logfile = {Full | Read | Write}] [Name=transaction_name] [TIMESTAMPE=transaction_timestamp] }], "Duration": ["1","ms"] COMMIT TRANSACTION [Name=transaction_name] [ASYNC] } ROLLBACK TRANSACTION [Name=transaction_name] [ASYNC]
  • 2. CREATE TYPE INSERT INTO UserProfile ATTRIBUTES (String Username, Integer Age, SET<UserProfile> Friends) UserProfile VALUES (Name = "User1", Age = 25) BACKWARDEDGES (UserProfile.Friends FriendOf) INSERT INTO UNIQUE (Username) UserProfile VALUES (Name = "User2", Age = 22, Friends = SETOF(Name = "User1")) MANDATORY (Username) INSERT INTO CREATE TYPE UserProfile VALUES (Name = "User3" Father = REF(Name = "User1"), Enemies = SETOF(Name = "User2")) SecondUserProfile EXTENDS UserProfile ATTRIBUTES (SET<UserProfile> Enemies) INSERT INTO CREATE TYPE UserProfile VALUES (Name = "User4", WeightedFriends = SETOF(Name = "User1":(1.2))) ThirdUserProfile EXTENDS UserProfile ATTRIBUTES (LIST<String> Hobbies) INSERT INTO ThirdUserProfile VALUES (Name = "User5", Hobbies = LISTOF("Books","Music")) INSERT INTO CREATE TYPES UserProfile VALUES (Name = "UndefinedAttributeUser", Weight = 70.1) /* Undefined Attribute */ Tag ATTRIBUTES (String Name) BACKWARDEDGES (Website.Tags TaggedSite) INDICES (Name) Website ATTRIBUTES (String Name, String URL, SET<Tag> Tags) INDICES (Name) FROM UserProfile U SELECT U.Friends.Friends.Name WHERE U.Name = "User1" FROM UserProfile U SELECT U.Name WHERE U.Friends.Friends.Name = "User1" ALTER TYPE FROM UserProfile U SELECT U.Friends.Count() UserProfile ADD ATTRIBUTES (SET<UserProfile> Enemies, UserProfile Father) ALTER TYPE UserProfile ADD BACKWARDEDGES (UserProfile.Enemies EnemyOf) ALTER TYPE UserProfile ADD ATTRIBUTES (SET<WEIGHTED(Double, DEFAULT = 1.5, SORTED = DESC) FROM UserProfile U <UserProfile>> WeightedFriends ) DESCRIBE TYPES SELECT U.Name.CONCAT("-> Age:", U.Age) AS "Name" DESCRIBE TYPE UserProfile FROM UserProfile U DESCRIBE SETTING Depth ON TYPE UserProfile SELECT U.Name, CURRENTDATE() DESCRIBE SETTING Depth ON ATTRIBUTE UserProfile.Friends FROM UserProfile U DROP TYPE SecondUserProfile DESCRIBE SETTINGS ON DB SELECT U.WeightedFriends.MAXWEIGHT() DESCRIBE INDEX Tag.Name FROM UserProfile U DESCRIBE FUNCTION CONCAT SELECT U.Name.SUBSTRING(2,3) FROM UserProfile U FROM UserProfile DROP INDEX IDX_Name SELECT U.Friends.Path(S.Name = "User1", 10, 10, "true", "false") WHERE U.Name = "User2" DEPTH 1 SETTING TYPE User SET („DEPTH“=2) CREATE INDEX IDX_Name ON UserProfile(Name) INDEXTYPE Hashtable FROM UserProfile U SELECT AVG(U.Age) UPDATE FROM UserProfile U UserProfile SET (Friends += SETOF(Name="User2", Name="User4") SELECT AVG(U.Age), U.Name TRUNCATE UserProfile WHERE Name = "User3" GROUP BY U.Name OFFSET 10 LIMIT 10 INSERTORUPDATE REPLACE UserProfile VALUES (Name = "User1", Age = 40) WHERE Name = "User1" UserProfile VALUES (Name = "User1", Age = 50) INSERTORUPDATE WHERE Name= "User1-new" UserProfile VALUES (Name = "User5") WHERE Name = "User5" FROM UserProfile DELETE WHERE Name = "User1" INSERTORREPLACE UserProfile VALUES (Name = "User1-new", Age = 50) WHERE Name = "User1"