orientdb icon indicating copy to clipboard operation
orientdb copied to clipboard

Database schema to SQL script export

Open ghost opened this issue 13 years ago • 3 comments

It would be very helpful if in OrientDB we had such tool as "database exporter" to SQL script.

For example, when we create some classes and data in database by Java API:

OClass classTest = database.createVertexType("Test");
classTest.createProperty("property1", OType.STRING);

Vertex vTest = database.addVertex("class:Test");
vTest.setProperty("property1", "value");

After using such tool we should get generated SQL script looking like this:

CREATE CLASS Test EXTENDS V;
CREATE PROPERTY Test.property1 STRING;

CREATE VERTEX Test SET property1="value";

It is very common in other databases (MySQL for example: http://www.thegeekstuff.com/2008/09/backup-and-restore-mysql-database-using-mysqldump/)

ghost avatar Nov 23 '13 10:11 ghost

:+1:

deluxxx avatar Nov 23 '13 10:11 deluxxx

+1 for me. Unfortunately we cannot put this feature before 2.1 unless we've a sponsor of it.

lvca avatar Nov 23 '13 11:11 lvca

This will be implemented in #2033, so I'm closing this issue

lvca avatar Feb 10 '14 15:02 lvca