@Test public void testVirtualProcedureWithNoFromAndOrderBy() throws Exception { helpResolve("EXEC pm1.vsp28()", RealMetadataFactory.example1Cached()); //$NON-NLS-1$ }
@Test public void testVirtualProcedureWithTempTableAndOrderBy() throws Exception { helpResolve("EXEC pm1.vsp33()", RealMetadataFactory.example1Cached()); //$NON-NLS-1$ }
@Test public void testVirtualProcedure() throws Exception { helpResolve("EXEC pm1.vsp1()", RealMetadataFactory.example1Cached()); //$NON-NLS-1$ }
@Test public void testVirtualProcedure2() throws Exception { helpResolve("EXEC pm1.vsp14()", RealMetadataFactory.example1Cached()); //$NON-NLS-1$ }
@Test public void testVirtualProcedurePartialParameterReference() throws Exception { helpResolve("EXEC pm1.vsp58(5)", RealMetadataFactory.example1Cached()); //$NON-NLS-1$ }
@Test public void testVirtualProcedureWithOrderBy() throws Exception { helpResolve("EXEC pm1.vsp29()", RealMetadataFactory.example1Cached()); //$NON-NLS-1$ }
@Test public void testVirtualProcedureWithConstAndOrderBy() throws Exception { helpResolve("EXEC pm1.vsp34()", RealMetadataFactory.example1Cached()); //$NON-NLS-1$ }
@Test public void testVDBQualified() throws Exception { helpResolve("EXEC example1.pm1.vsp29()", RealMetadataFactory.example1Cached()); //$NON-NLS-1$ }
private void helpResolveException(String userUpdateStr, QueryMetadataInterface metadata, String msg) throws QueryParserException, TeiidComponentException { try { helpResolve(userUpdateStr, metadata); fail(); } catch (QueryResolverException e) { assertEquals(msg, e.getMessage()); } }
/** * Constants will now auto resolve if they are consistently representable in the target type */ @Test public void testDefect23257() throws Exception{ CreateProcedureCommand command = (CreateProcedureCommand) helpResolve("EXEC pm6.vsp59()", RealMetadataFactory.example1Cached()); //$NON-NLS-1$ CommandStatement cs = (CommandStatement)command.getBlock().getStatements().get(1); Insert insert = (Insert)cs.getCommand(); assertEquals(DataTypeManager.DefaultDataClasses.SHORT, ((Expression)insert.getValues().get(1)).getType()); }