
com.github.gkutiel.flip.db.FlipDB Maven / Gradle / Ivy
package com.github.gkutiel.flip.db;
import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import com.sun.xml.internal.messaging.saaj.util.ByteInputStream;
public class FlipDB {
static class Magic implements InvocationHandler {
private final List pool = new LinkedList<>();
private final String url;
public Magic(final String url) {
this.url = url;
}
private Object buildReturnType(final Class> returnType, final ResultSet rs) throws SQLException {
if (returnType.equals(ResultSet.class)) return rs;
if (returnType.isArray()) {
final Class> componentType = returnType.getComponentType();
final List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy