Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

[OEP 21] New API for execute pseudo sql command for admin operations #21

Open
5 of 11 tasks
tglman opened this issue May 24, 2019 · 0 comments
Open
5 of 11 tasks

Comments

@tglman
Copy link
Member

tglman commented May 24, 2019

Summary:
This is an attempt to define a generic API for execute admin operations on an OrientDB context.

Goals:
Add an API for run a range of not pre-defined admin operations, that can be executed from any connection type.

Non-Goals:

  • Define the operations that can be executed

Success metrics:

  • Stable API for admin operations that do not create issues on remote protocols
  • API that allow to evolve and add operations not yet defined

Motivation:
As today each admin operation needed to be defined in all the existing protocols, slowing down all the possible future evolutions, and adding a toll for every single enchantment to third party integrations.

Description:
As today all the structural operations have their own API, and some structural operations were moved inside the SQL (all distributed HA) but this operations can be run only inside a database context limiting the set of changes that can be done.

Here we propose to define a new API that can run SQL like operations on top of an OrientDB context, opening to the possibility to define a query language for any kind of structural operations inside OrientDB.

The proposed API are:

OResultSet admin(String command, Map<Object,Object> args); 
OResultSet admin(String command, Object[] args); 

This API is borrowing the OResultSet from the database query API.

One Important detail is the method name, please propose any other if this is not look good for you.

Alternatives:

OResultSet command(String command, Map<Object,Object> args); 
OResultSet command(String command, Object[] args); 
OResultSet execute(String command, Map<Object,Object> args); 
OResultSet execute(String command, Object[] args); 

Risks and assumptions:
This move out the static typed API we had so far for structural operations, see for example the OrientDB#create that specify on the API what are the exact possible arguments, even though we can implements save APIs on top of this.

Impact matrix

  • Storage engine
  • SQL
  • Protocols
  • Indexes
  • Console
  • [ x ] Java API
  • Geospatial
  • Lucene
  • Security
  • Hooks
  • EE
  • Studio
@tglman tglman changed the title [OEP 19] New API for execute pseudo sql command for admin operations [OEP 21] New API for execute pseudo sql command for admin operations May 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant