Package org.jooq.tools.jdbc

Examples of org.jooq.tools.jdbc.MockResult


                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(?, ?, ?, ?) }");
View Full Code Here


        @Override
        public MockResult[] execute(MockExecuteContext ctx) throws SQLException {
            execute0(ctx);

            return new MockResult[] {
                new MockResult(0, resultEmpty)
            };
        }
View Full Code Here

        @Override
        public MockResult[] execute(MockExecuteContext ctx) throws SQLException {
            execute0(ctx);

            return new MockResult[] {
                new MockResult(recordOne)
            };
        }
View Full Code Here

        @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)
            };
        }
View Full Code Here

            assertEquals(0, ctx.batchBindings().length);
            assertEquals(asList(), asList(ctx.bindings()));

            return new MockResult[] {
                new MockResult(0, null),
                new MockResult(1, null)
            };
        }
View Full Code Here

            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)
            };
        }
View Full Code Here

            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)
            };
        }
View Full Code Here

                result.add(record);
            }

            return new MockResult[] {
                new MockResult(0, result)
            };
        }
View Full Code Here

                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);
View Full Code Here

TOP

Related Classes of org.jooq.tools.jdbc.MockResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.