Search in sources :

Example 41 with Column

use of org.obeonetwork.dsl.database.Column in project InformationSystem by ObeoNetwork.

the class ColumnServicesTest method isUniqueCheckTest.

@Test
public void isUniqueCheckTest() {
    Table table = getGSSerieTable();
    Column col = getColumn(table, "GS_SERIE_NOM");
    assertEquals("X", new ColumnServices().checkUnique(col));
}
Also used : Table(org.obeonetwork.dsl.database.Table) Column(org.obeonetwork.dsl.database.Column) Test(org.junit.Test) AbstractTest(org.obeonetwork.database.m2doc.services.common.AbstractTest)

Example 42 with Column

use of org.obeonetwork.dsl.database.Column in project InformationSystem by ObeoNetwork.

the class ColumnServicesTest method isPrimaryKeyNullTest.

@Test
public void isPrimaryKeyNullTest() {
    Table table = getGSSerieTable();
    Column col = getColumn(table, "No table");
    assertEquals("No", new ColumnServices().isInPrimaryKey(col));
}
Also used : Table(org.obeonetwork.dsl.database.Table) Column(org.obeonetwork.dsl.database.Column) Test(org.junit.Test) AbstractTest(org.obeonetwork.database.m2doc.services.common.AbstractTest)

Example 43 with Column

use of org.obeonetwork.dsl.database.Column in project InformationSystem by ObeoNetwork.

the class ColumnServicesTest method isAutoincrementNullTest.

@Test
public void isAutoincrementNullTest() {
    Table table = getGSSerieTable();
    Column col = getColumn(table, "No table");
    assertEquals("No", new ColumnServices().isAutoincrement(col));
}
Also used : Table(org.obeonetwork.dsl.database.Table) Column(org.obeonetwork.dsl.database.Column) Test(org.junit.Test) AbstractTest(org.obeonetwork.database.m2doc.services.common.AbstractTest)

Example 44 with Column

use of org.obeonetwork.dsl.database.Column in project InformationSystem by ObeoNetwork.

the class ColumnServicesTest method checkNullableNullTest.

@Test
public void checkNullableNullTest() {
    Table table = getGSSerieTable();
    Column col = getColumn(table, "No table");
    assertEquals("", new ColumnServices().checkNullable(col));
}
Also used : Table(org.obeonetwork.dsl.database.Table) Column(org.obeonetwork.dsl.database.Column) Test(org.junit.Test) AbstractTest(org.obeonetwork.database.m2doc.services.common.AbstractTest)

Example 45 with Column

use of org.obeonetwork.dsl.database.Column in project InformationSystem by ObeoNetwork.

the class ColumnServicesTest method testNoDefaultValueService.

@Test
public void testNoDefaultValueService() {
    Column col = (Column) EcoreUtil.create(DatabasePackage.Literals.COLUMN);
    assertEquals("", new ColumnServices().defaultValue(col));
}
Also used : Column(org.obeonetwork.dsl.database.Column) Test(org.junit.Test) AbstractTest(org.obeonetwork.database.m2doc.services.common.AbstractTest)

Aggregations

Column (org.obeonetwork.dsl.database.Column)83 Table (org.obeonetwork.dsl.database.Table)41 Test (org.junit.Test)31 AbstractTest (org.obeonetwork.database.m2doc.services.common.AbstractTest)31 TypeInstance (org.obeonetwork.dsl.typeslibrary.TypeInstance)11 EObject (org.eclipse.emf.ecore.EObject)9 AbstractTable (org.obeonetwork.dsl.database.AbstractTable)8 ForeignKey (org.obeonetwork.dsl.database.ForeignKey)7 ArrayList (java.util.ArrayList)6 Constraint (org.obeonetwork.dsl.database.Constraint)6 ForeignKeyElement (org.obeonetwork.dsl.database.ForeignKeyElement)6 Sequence (org.obeonetwork.dsl.database.Sequence)6 BigInteger (java.math.BigInteger)5 ResultSet (java.sql.ResultSet)5 SQLException (java.sql.SQLException)5 NativeType (org.obeonetwork.dsl.typeslibrary.NativeType)5 PreparedStatement (java.sql.PreparedStatement)4 Viewer (org.eclipse.jface.viewers.Viewer)4 ViewerFilter (org.eclipse.jface.viewers.ViewerFilter)4 IndexElement (org.obeonetwork.dsl.database.IndexElement)4