This type is used to wrap unified results of DDL and DML query executions. JDBC execution results can be summarised to two properties:
See {@link MockDataProvider#execute(MockExecuteContext)} for more details @author Lukas Eder @see MockDataProvider
531532533534535536537538539540541
assertEquals(0, ctx.outParameterTypes()[1]); assertEquals(Types.VARCHAR, ctx.outParameterTypes()[2]); assertEquals(0, ctx.outParameterTypes()[3]); assertEquals(Types.DATE, ctx.outParameterTypes()[4]); return new MockResult[] { new MockResult(recordOne) }; } }); CallableStatement stmt = connection.prepareCall("{ ? = call my_function(?, ?, ?, ?) }");
125126127128129130131132
@Override public MockResult[] execute(MockExecuteContext ctx) throws SQLException { execute0(ctx); return new MockResult[] { new MockResult(0, resultEmpty) }; }
154155156157158159160161
@Override public MockResult[] execute(MockExecuteContext ctx) throws SQLException { execute0(ctx); return new MockResult[] { new MockResult(recordOne) }; }
210211212213214215216217218219
@Override public MockResult[] execute(MockExecuteContext ctx) throws SQLException { execute0(ctx); return new MockResult[] { new MockResult(0, resultOne), new MockResult(0, resultTwo), new MockResult(0, resultStrings) }; }
257258259260261262263264265
assertEquals(0, ctx.batchBindings().length); assertEquals(asList(), asList(ctx.bindings())); return new MockResult[] { new MockResult(0, null), new MockResult(1, null) }; }
294295296297298299300301302
assertEquals(asList(1, 2), asList(ctx.batchBindings()[0])); assertEquals(asList(3, 4), asList(ctx.batchBindings()[1])); assertEquals(asList(1, 2), asList(ctx.bindings())); return new MockResult[] { new MockResult(0, null), new MockResult(1, null) }; }
351352353354355356357358
assertEquals(1, ctx.batchBindings().length); assertEquals(asList(1), asList(ctx.batchBindings()[0])); assertEquals(asList(1), asList(ctx.bindings())); return new MockResult[] { new MockResult(1, resultOne) }; }
462463464465466467468469
result.add(record); } return new MockResult[] { new MockResult(0, result) }; }
7374757677787980818283
r.add(create.newRecord(BOOL_TABLE, new Object[] { Bool.TRUE })); r.add(create.newRecord(BOOL_TABLE, new Object[] { Bool.FALSE })); r.add(create.newRecord(BOOL_TABLE, new Object[] { Bool.NULL })); return new MockResult[] { new MockResult(r.size(), r) }; } })).selectFrom(BOOL_TABLE).fetch(); assertEquals(3, result.size()); assertEquals(1, result.fields().length);