GV

GeezerVison

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

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

On this site

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

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unable to add property with constraint · Issue #507 · ArcadeData/arcadedb

Unable to add property with constraint #507

New issue
Copy link
New issue
Copy link
Closed
Closed
Unable to add property with constraint#507
Copy link
Assignees
lvca
Labels
documentationImprovements or additions to documentation
Milestone
22.9.1

Description

@forsakendaemon
forsakendaemon
opened on Sep 7, 2022
Issue body actions

ArcadeDB Version: 22.8.1 (build b63f040/1659468151386/main)

JDK Version: Docker image - Open JDK JAVA_VERSION=jdk-11.0.13+8

OS: Docker image arcadedata/arcadedb:22.8.1

Expected behavior

Add property with constraint.

Actual behavior

The following error is raised when a constraint is included, including mandatory, notnull, and readonly.

<ArcadeDB_0> Error on command execution (PostCommandHandler)
com.arcadedb.exception.CommandSQLParsingException: com.arcadedb.query.sql.parser.ParseException: Encountered " <CREATE> "CREATE "" at line 2, column 1.
Was expecting one of:
    <WHILE> ...
    <IF> ...
    <FOREACH> ...
    ";" ...

        at com.arcadedb.query.sql.executor.SQLEngine.parseScript(SQLEngine.java:112)
        at com.arcadedb.query.sql.executor.SQLEngine.parseScript(SQLEngine.java:104)
        at com.arcadedb.database.EmbeddedDatabase.execute(EmbeddedDatabase.java:1237)
        at com.arcadedb.server.ServerDatabase.execute(ServerDatabase.java:415)
        at com.arcadedb.server.http.handler.PostCommandHandler.executeScript(PostCommandHandler.java:100)
        at com.arcadedb.server.http.handler.PostCommandHandler.execute(PostCommandHandler.java:71)
        at com.arcadedb.server.http.handler.DatabaseAbstractHandler.execute(DatabaseAbstractHandler.java:85)
        at com.arcadedb.server.http.handler.AbstractHandler.handleRequest(AbstractHandler.java:109)
        at io.undertow.server.RoutingHandler.handleRequest(RoutingHandler.java:93)
        at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:104)
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:387)
        at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:256)
        at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136)
        at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:59)
        at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
        at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
        at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
        at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
Caused by: com.arcadedb.query.sql.parser.ParseException: Encountered " <CREATE> "CREATE "" at line 2, column 1.
Was expecting one of:
    <WHILE> ...
    <IF> ...
    <FOREACH> ...
    ";" ...

        at com.arcadedb.query.sql.parser.SqlParser.generateParseException(SqlParser.java:26767)
        at com.arcadedb.query.sql.parser.SqlParser.jj_consume_token(SqlParser.java:26603)
        at com.arcadedb.query.sql.parser.SqlParser.ParseScript(SqlParser.java:337)
        at com.arcadedb.query.sql.executor.SQLEngine.parseScript(SQLEngine.java:110)
        ... 17 more

Steps to reproduce

Create new database and run the following in Studio using SQL Script mode.

CREATE VERTEX TYPE Thing;
CREATE PROPERTY Thing.text STRING mandatory = true;

Activity

  1. lvca
    self-assigned this
    on Sep 7, 2022
  2. lvca commented on Sep 7, 2022

    @lvca
    lvca
    on Sep 7, 2022
    Member
    More actions

    The right syntax is:

    CREATE PROPERTY Thing.text STRING (mandatory true)

    Did you see that syntax in some docs?

  3. lvca
    closed this as completedon Sep 7, 2022
  4. lvca
    added
    invalidThis doesn't seem right
    questionFurther information is requested
    on Sep 7, 2022
  5. forsakendaemon commented on Sep 7, 2022

    @forsakendaemon
    forsakendaemon
    on Sep 7, 2022
    Author
    More actions

    Ah excellent, thank you! Yes, that's the syntax in the manual, I even copied the example directly from there (a DATE in that case).

  6. lvca commented on Sep 7, 2022

    @lvca
    lvca
    on Sep 7, 2022
    Member
    More actions

    Found in the docs. Fixing the docs. I guess we modified that statement from OrientDB, no sure why. I'm wondering if it's better to update the docs or to change the syntax to be more compatible with OrientDB...

  7. lvca commented on Sep 7, 2022

    @lvca
    lvca
    on Sep 7, 2022
    Member
    More actions

    @forsakendaemon I've double-checked OrientDB docs and it doesn't allow setting constraints in te create property SQL statement, but only with the alter property. In that case, the equals are not in the syntax, so I'm leaving everything like it is and just updating the docs.

  8. lvca
    added a commit that references this issue on Sep 7, 2022

    Added test case for issue #507

    c45b72e
  9. lvca commented on Sep 7, 2022

    @lvca
    lvca
    on Sep 7, 2022
    Member
    More actions

    Ok, docs updated, the CI will publish them in max 10 minutes. @forsakendaemon thanks for reporting the issue.

  10. lvca
    added
    documentationImprovements or additions to documentation
    and removed
    invalidThis doesn't seem right
    questionFurther information is requested
    on Sep 7, 2022
  11. lvca
    added this to the 22.9.1 milestone on Sep 7, 2022
  12. mergify
    added a commit that references this issue on Apr 26, 2026

    chore(studio-deps-dev)(deps-dev): bump enhanced-resolve from 5.20.1 t…

    53ad983
  13. tae898
    added 2 commits that reference this issue on Jun 28, 2026

    Added test case for issue #507

    8e64ca5

    chore(studio-deps-dev)(deps-dev): bump enhanced-resolve from 5.20.1 t…

    e5d5511
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

    Milestone

    • 22.9.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

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