what about something like:

Iterable<Vertex> resultIteratorVertices = g.getVertices(true);
for (Vertex v : resultIteratorVertices){
v.remove();
}



Il giorno lunedì 21 novembre 2016 11:01:42 UTC+1, Academia Learning Centro 
de inglés y de formación ha scritto:
>
> To not delete all classes / schemas / tables only the records
>
> El lunes, 21 de noviembre de 2016, 10:52:38 (UTC+1), Ivan Mainetti 
> escribió:
>>
>> why you don't just delete and recreate the entire db?
>>
>> Il giorno lunedì 21 novembre 2016 10:28:55 UTC+1, Academia Learning 
>> Centro de inglés y de formación ha scritto:
>>>
>>> Hello, I want to empty the db and I was testing this way (I do not know 
>>> if it's the right one)
>>>
>>> Iterable<Vertex> resultIteratorVertices = graph.getVertices(true);
>>> for (Vertex v : resultIteratorVertices){
>>>    graph.command( new OCommandSQL("TRUNCATE CLASS "+ *v.getClass* + " 
>>> POLYMORPHIC UNSAFE") ).execute();
>>> }
>>>
>>> To remove all records from all classes, but I can not figure out how to 
>>> get the type of class from each record
>>>
>>

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to