use of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx in project orientdb by orientechnologies.
the class ODocumentTrackingNestedCollectionsTest method before.
@Before
public void before() {
db = new ODatabaseDocumentTx("memory:" + ODocumentTrackingNestedCollectionsTest.class.getSimpleName());
db.create();
}
use of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx in project orientdb by orientechnologies.
the class DocumentTest method before.
@BeforeClass
public void before() {
db = new ODatabaseDocumentTx("memory:" + DocumentTest.class.getSimpleName());
db.create();
}
use of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx in project orientdb by orientechnologies.
the class OSimpleKeyIndexDefinitionTest method testReload.
@Test
public void testReload() {
final ODatabaseDocumentTx databaseDocumentTx = new ODatabaseDocumentTx("memory:osimplekeyindexdefinitiontest");
databaseDocumentTx.create();
final ODocument storeDocument = simpleKeyIndexDefinition.toStream();
storeDocument.save();
final ODocument loadDocument = databaseDocumentTx.load(storeDocument.getIdentity());
final OSimpleKeyIndexDefinition loadedKeyIndexDefinition = new OSimpleKeyIndexDefinition();
loadedKeyIndexDefinition.fromStream(loadDocument);
databaseDocumentTx.drop();
Assert.assertEquals(loadedKeyIndexDefinition, simpleKeyIndexDefinition);
}
use of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx in project orientdb by orientechnologies.
the class TxNonUniqueIndexWithCollationTest method before.
@Before
public void before() {
db = new ODatabaseDocumentTx("memory:TxNonUniqueIndexWithCollationTest");
db.create();
db.getMetadata().getSchema().createClass("user").createProperty("name", OType.STRING).setCollate("ci").createIndex(OClass.INDEX_TYPE.NOTUNIQUE);
db.newInstance("user").field("name", "abc").save();
db.newInstance("user").field("name", "aby").save();
db.newInstance("user").field("name", "aby").save();
db.newInstance("user").field("name", "abz").save();
}
use of com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx in project orientdb by orientechnologies.
the class TxUniqueIndexWithCollationTest method before.
@Before
public void before() {
db = new ODatabaseDocumentTx("memory:TxUniqueIndexWithCollationTest");
db.create();
db.getMetadata().getSchema().createClass("user").createProperty("name", OType.STRING).setCollate("ci").createIndex(OClass.INDEX_TYPE.UNIQUE);
db.newInstance("user").field("name", "abc").save();
db.newInstance("user").field("name", "aby").save();
db.newInstance("user").field("name", "abz").save();
}
Aggregations