package jjnguy;

import java.sql.Connection;
import java.sql.DriverManager;

import jjnguy.jdapper.JDapper;

public class Main {
	public static void main(String[] args) throws Exception {
		String url = "jdbc:mysql://localhost:3307/";
		String dbName = "test"; //"world";
		String driver = "com.mysql.jdbc.Driver";
		String userName = "jjnguy";
		String password = "asdf1234";
		Class.forName(driver).newInstance();
		Connection conn = DriverManager.getConnection(url + dbName, userName, password);
		JDapper jd = new JDapper(conn);

		Stuff s = new Stuff();
		s.string1 = "Hi youtube";
		s.number1 = 42;
		
		jd.insert("stuff", s);
	}
}

@@ -68,16 +68,39 @@
 Manager;
+%0Aimport java.util.List;
 %0A%0Aimport
@@ -145,17 +145,20 @@
  Main %7B%0A
-%09
+    
 public s
@@ -207,18 +207,24 @@
 ption %7B%0A
-%09%09
+        
 String u
@@ -260,18 +260,24 @@
 3307/%22;%0A
-%09%09
+        
 String d
@@ -303,18 +303,24 @@
 world%22;%0A
-%09%09
+        
 String d
@@ -352,18 +352,24 @@
 river%22;%0A
-%09%09
+        
 String u
@@ -388,18 +388,24 @@
 jnguy%22;%0A
-%09%09
+        
 String p
@@ -426,18 +426,24 @@
 f1234%22;%0A
-%09%09
+        
 Class.fo
@@ -471,18 +471,24 @@
 ance();%0A
-%09%09
+        
 Connecti
@@ -560,18 +560,24 @@
 sword);%0A
-%09%09
+        
 JDapper 
@@ -601,18 +601,24 @@
 conn);%0A%0A
-%09%09
+        
 Stuff s 
@@ -632,18 +632,24 @@
 tuff();%0A
-%09%09
+        
 s.string
@@ -666,18 +666,24 @@
 utube%22;%0A
-%09%09
+        
 s.number
@@ -694,13 +694,102 @@
 42;%0A
-%09%09%0A%09%09
+%0A        List%3CCountry%3E countries = jd.query(%22SELECT * FROM %5BTable%5D%22, Country.class);%0A%0A        
 jd.i
@@ -811,9 +811,12 @@
 s);%0A
-%09
+    
 %7D%0A%7D%0A

format Main