Hi Erik, The Command is intended for the execution of non-idempotent statements (e.g. UPDATE or INSERT), while the Query can only execute idempotent statements (eg. SELECT, MATCH)
Thanks Luigi 2018-05-17 12:31 GMT+02:00 Erik T <[email protected]>: > Thanks Luigi. > > So what's the difference between OCommandSQL and OSQLSyncQuery? They seem > to be the same so why have two classes? > > On Thu, May 17, 2018, 3:30 AM Luigi Dell'Aquila < > [email protected]> wrote: > >> Hi Erik, >> >> The query is executed synchronously. The result is returned as soon as >> all the result set is available. >> >> With the new API (v 3.0) the queries are still synchronous, but the >> result set is paginated, so the first results are returned as soon as they >> are available >> >> Thanks >> >> Luigi >> >> >> 2018-05-16 21:43 GMT+02:00 Erik T <[email protected]>: >> >>> For this code >>> >>> OCommandSQL preparedQuery = new OCommandSQL(query); >>> OrientBaseGraph graph = (OrientBaseGraph) getGraph().getBaseGraph(); >>> return AccessController.doPrivileged((PrivilegedAction<Object>) () -> >>> graph.command(preparedQuery).execute(stationNames)); >>> >>> >>> Is preparedQuery executed synchronously or asynchronously? >>> >>> -- >>> >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "OrientDB" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "OrientDB" group. >> To unsubscribe from this topic, visit https://groups.google.com/d/ >> topic/orient-database/OheQJchmXME/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
