├── examples
├── MySQL_example1
│ ├── sketch.properties
│ └── MySQL_example1.pde
├── MySQL_example3
│ ├── data
│ │ └── test.db
│ └── MySQL_example3.pde
├── SQLite_example1
│ ├── data
│ │ └── test.db
│ └── SQLite_example1.pde
├── SQLite_example2
│ ├── data
│ │ └── test.db
│ └── SQLite_example2.pde
├── MySQL_timestamp
│ └── MySQL_timestamp.pde
├── MySQL_example2
│ └── MySQL_example2.pde
├── MySQL_localhost_example
│ └── MySQL_localhost_example.pde
└── PostgreSQL_example1
│ └── PostgreSQL_example1.pde
├── lib
├── build.number
├── ant-contrib-1.0b3.jar
├── sqlite-jdbc-3.7.2.jar
├── mysql-connector-j-8.0.31.jar
└── postgresql-9.2-1002.jdbc3.jar
├── release
├── BezierSQLib.zip
└── BezierSQLib.txt
├── resources
├── build.number
├── library.properties
├── web
│ ├── stylesheet.css
│ └── index.html
└── stylesheet.css
├── .project
├── .gitignore
├── .classpath
├── src
├── de
│ └── bezier
│ │ └── data
│ │ └── sql
│ │ ├── mapper
│ │ ├── NameMapper.java
│ │ └── UnderScoreToCamelCaseMapper.java
│ │ ├── MySQL.java
│ │ ├── SQLite.java
│ │ ├── PostgreSQL.java
│ │ └── SQL.java
└── DeBezierDataSQL.java
└── readme.md
/examples/MySQL_example1/sketch.properties:
--------------------------------------------------------------------------------
1 | mode.id=processing.mode.java.JavaMode
2 | mode=Java
3 |
--------------------------------------------------------------------------------
/lib/build.number:
--------------------------------------------------------------------------------
1 | #Build Number for ANT. Do not edit!
2 | #Sun Jan 08 14:58:26 CET 2023
3 | build.number=599
4 |
--------------------------------------------------------------------------------
/release/BezierSQLib.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fjenett/sql-library-processing/HEAD/release/BezierSQLib.zip
--------------------------------------------------------------------------------
/lib/ant-contrib-1.0b3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fjenett/sql-library-processing/HEAD/lib/ant-contrib-1.0b3.jar
--------------------------------------------------------------------------------
/lib/sqlite-jdbc-3.7.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fjenett/sql-library-processing/HEAD/lib/sqlite-jdbc-3.7.2.jar
--------------------------------------------------------------------------------
/resources/build.number:
--------------------------------------------------------------------------------
1 | #Build Number for ANT. Do not edit!
2 | #Sun Jan 08 14:58:26 CET 2023
3 | build.number=1194
4 |
--------------------------------------------------------------------------------
/lib/mysql-connector-j-8.0.31.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fjenett/sql-library-processing/HEAD/lib/mysql-connector-j-8.0.31.jar
--------------------------------------------------------------------------------
/lib/postgresql-9.2-1002.jdbc3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fjenett/sql-library-processing/HEAD/lib/postgresql-9.2-1002.jdbc3.jar
--------------------------------------------------------------------------------
/examples/MySQL_example3/data/test.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fjenett/sql-library-processing/HEAD/examples/MySQL_example3/data/test.db
--------------------------------------------------------------------------------
/examples/SQLite_example1/data/test.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fjenett/sql-library-processing/HEAD/examples/SQLite_example1/data/test.db
--------------------------------------------------------------------------------
/examples/SQLite_example2/data/test.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fjenett/sql-library-processing/HEAD/examples/SQLite_example2/data/test.db
--------------------------------------------------------------------------------
/release/BezierSQLib.txt:
--------------------------------------------------------------------------------
1 | name = BezierSQLib
2 | authorList = [Florian Jenett](http://www.bezier.de/)
3 | url = https://github.com/fjenett/sql-library-processing
4 | category = Data
5 | sentence = A library to facilitate communication with SQL-based databases
6 | paragraph = SQLibrary is an interface to MySQL, SQLite and PostgreSQL databases
7 | version = 1192
8 | prettyVersion = 0.3.2
--------------------------------------------------------------------------------
/resources/library.properties:
--------------------------------------------------------------------------------
1 | name = @@LIBRARY_NAME@@
2 | authorList = [Florian Jenett](http://www.bezier.de/)
3 | url = https://github.com/fjenett/sql-library-processing
4 | category = Data
5 | sentence = A library to facilitate communication with SQL-based databases
6 | paragraph = SQLibrary is an interface to MySQL, SQLite and PostgreSQL databases
7 | version = @@VERSION@@
8 | prettyVersion = @@PRETTY_VERSION@@
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | sql-library-processing
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.jdt.core.javanature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *~
3 |
4 | local.properties
5 | /BezierSQLib
6 |
7 | # ant-javac build directory
8 | /bin/
9 |
10 | # hide some results
11 | documentation/*
12 | distribution/*
13 |
14 | # XCode
15 | build/
16 | *.mode1
17 | *.mode1v3
18 | *.mode2v3
19 | *.perspective
20 | *.perspectivev3
21 | *.pbxuser
22 |
23 | # old stuff i can't seem to be able to delete
24 | releases/
25 |
26 | website/BezierSQLib/*
27 | web-export/*
28 | */web-export/*
29 | web-export
30 | .idea/
31 |
--------------------------------------------------------------------------------
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/de/bezier/data/sql/mapper/NameMapper.java:
--------------------------------------------------------------------------------
1 | package de.bezier.data.sql.mapper;
2 |
3 | /**
4 | * NameMapper is used to map database names to instance names
5 | * When setting objects from objects with SQL.setFromRow().
6 | *
7 | * This is just an interface and only one implementation is
8 | * provided in form of the default UnderScoreToCamelCaseMapper
9 | * which does: field_name -> fieldName and vv.
10 | */
11 |
12 | public interface NameMapper
13 | {
14 | /**
15 | * Maps a database name to an object name, typically
16 | * this might look like: field_name -> fieldName.
17 | */
18 | public String forward ( String name );
19 |
20 | /**
21 | * Reverse of forward, maps object names to database
22 | * names like: fieldName -> field_name.
23 | */
24 | public String backward ( String name );
25 | }
--------------------------------------------------------------------------------
/examples/SQLite_example1/SQLite_example1.pde:
--------------------------------------------------------------------------------
1 | // fjenett 20081129
2 |
3 | import de.bezier.data.sql.*;
4 |
5 | SQLite db;
6 |
7 | void setup()
8 | {
9 | size( 100, 100 );
10 |
11 | db = new SQLite( this, "test.db" ); // open database file
12 |
13 | if ( db.connect() )
14 | {
15 | // list table names
16 | db.query( "SELECT name as \"Name\" FROM SQLITE_MASTER where type=\"table\"" );
17 |
18 | while (db.next())
19 | {
20 | println( db.getString("Name") );
21 | }
22 |
23 | // read all in table "table_one"
24 | db.query( "SELECT * FROM table_one" );
25 |
26 | while (db.next())
27 | {
28 | println( db.getString("field_one") );
29 | println( db.getInt("field_two") );
30 | }
31 | }
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/examples/SQLite_example2/SQLite_example2.pde:
--------------------------------------------------------------------------------
1 | // fjenett 20120226
2 |
3 | import de.bezier.data.sql.*;
4 |
5 | SQLite db;
6 |
7 | void setup()
8 | {
9 | size( 100, 100 );
10 |
11 | db = new SQLite( this, "test.db" ); // open database file
12 |
13 | if ( db.connect() )
14 | {
15 | String[] tableNames = db.getTableNames();
16 |
17 | db.query( "SELECT * FROM %s", tableNames[0] );
18 |
19 | while (db.next())
20 | {
21 | TableOne t = new TableOne();
22 | db.setFromRow( t );
23 | println( t );
24 | }
25 | }
26 | }
27 |
28 | class TableOne
29 | {
30 | public String fieldOne;
31 | public int fieldTwo;
32 |
33 | public String toString ()
34 | {
35 | return String.format("fieldOne: %s fieldTwo: %d", fieldOne, fieldTwo);
36 | }
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/examples/MySQL_timestamp/MySQL_timestamp.pde:
--------------------------------------------------------------------------------
1 | import de.bezier.data.sql.*;
2 |
3 | /*
4 | CREATE TABLE `test` (
5 | `id` int(10) NOT NULL auto_increment,
6 | `time` timestamp NOT NULL default CURRENT_TIMESTAMP,
7 | PRIMARY KEY (`id`)
8 | )
9 | */
10 |
11 | MySQL ms;
12 | java.sql.Timestamp last_ts;
13 |
14 | String database = "ddd", user = "", pass = "";
15 |
16 | void setup ()
17 | {
18 | ms = new MySQL( this, "localhost", database, user, pass );
19 | last_ts = new java.sql.Timestamp( 0 );
20 |
21 | if ( ms.connect() )
22 | {
23 | ms.query( "SELECT * FROM test ORDER BY time ASC LIMIT 1" );
24 | ms.next();
25 | last_ts = ms.getTimestamp("time");
26 | }
27 | }
28 |
29 | void draw ()
30 | {
31 | if ( ms.connect() )
32 | {
33 | ms.query( "SELECT * FROM test WHERE time > '"+last_ts+"' ORDER BY time ASC" );
34 | while( ms.next() )
35 | {
36 | println( ms.getInt( "id" ) );
37 | last_ts = ms.getTimestamp( "time" );
38 | }
39 | }
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/examples/MySQL_example3/MySQL_example3.pde:
--------------------------------------------------------------------------------
1 | // fjenett 20120226
2 |
3 | import de.bezier.data.sql.*;
4 |
5 | MySQL db;
6 |
7 | void setup()
8 | {
9 | size( 100, 100 );
10 |
11 | db = new MySQL( this, "localhost", "x", "x", "x" ); // open database file
12 | db.setDebug(false);
13 |
14 | if ( db.connect() )
15 | {
16 | String[] tableNames = db.getTableNames();
17 |
18 | db.query( "SELECT * FROM %s", tableNames[0] );
19 |
20 | while (db.next())
21 | {
22 | TableOne t = new TableOne();
23 | db.setFromRow( t );
24 | println( t );
25 | }
26 |
27 | TableOne t1 = new TableOne();
28 | t1.fieldOne = "one, two, three";
29 | t1.fieldTwo = 123;
30 | t1.id = 101;
31 | db.saveToDatabase(t1);
32 | }
33 | }
34 |
35 | class TableOne
36 | {
37 | int id;
38 | public String fieldOne;
39 | public int fieldTwo;
40 |
41 | public String toString ()
42 | {
43 | return String.format("id: %d, fieldOne: %s fieldTwo: %d", id, fieldOne, fieldTwo);
44 | }
45 |
46 | public void setId ( int id ) {
47 | this.id = id;
48 | }
49 |
50 | public int getId () {
51 | return id;
52 | }
53 | }
54 |
55 |
--------------------------------------------------------------------------------
/examples/MySQL_example2/MySQL_example2.pde:
--------------------------------------------------------------------------------
1 | import de.bezier.data.sql.*;
2 |
3 | // created 2005-05-10 by fjenett
4 | // updated fjenett 20080605
5 |
6 |
7 | MySQL dbconnection;
8 |
9 |
10 | void setup()
11 | {
12 | size( 100, 100 );
13 |
14 | // this example assumes that you are running the
15 | // mysql server locally (on "localhost").
16 | //
17 |
18 | // replace --username--, --password-- with your mysql-account.
19 | //
20 | String user = "ffu";
21 | String pass = "ffu";
22 |
23 | // name of the database to use
24 | //
25 | String database = "ffu";
26 |
27 | // name of the table that will be created
28 | //
29 | String table = "";
30 |
31 | // connect to database of server "localhost"
32 | //
33 | dbconnection = new MySQL( this, "localhost", database, user, pass );
34 |
35 | if ( dbconnection.connect() )
36 | {
37 | // now read it back out
38 | //
39 | dbconnection.query( "SELECT * FROM file_uploads" );
40 |
41 | while (dbconnection.next())
42 | {
43 | String s = dbconnection.getString("name");
44 | int n = dbconnection.getInt("fuid");
45 | println(s + " " + n);
46 | }
47 | }
48 | else
49 | {
50 | // connection failed !
51 | }
52 | }
53 |
54 | void draw()
55 | {
56 | // i know this is not really a visual sketch ...
57 | }
58 |
--------------------------------------------------------------------------------
/examples/MySQL_localhost_example/MySQL_localhost_example.pde:
--------------------------------------------------------------------------------
1 | // Library by fjenett
2 | // Example created on 2014-03-12 by Powder
3 | // Tested with Processing 3.0a5
4 |
5 | import de.bezier.data.sql.*;
6 |
7 | String dbHost = "localhost"; // if you are using a using a local database, this should be fine
8 | String dbPort = "8889"; // replace with database port, MAMP standard is 8889
9 | String dbUser = "root"; // replace with database username, MAMP standard is "root"
10 | String dbPass = "root"; // replace with database password, MAMP standard is "root"
11 | String dbName = "database_name"; // replace with database name
12 | String tableName = "table_name"; // replace with table name
13 |
14 | MySQL msql;
15 |
16 | void setup() {
17 | msql = new MySQL( this, dbHost + ":" + dbPort, dbName, dbUser, dbPass );
18 |
19 | if (msql.connect()) {
20 | // get number of rows
21 | msql.query("SELECT COUNT(*) FROM " + tableName);
22 | msql.next();
23 | println("Number of rows: " + msql.getInt(1));
24 | println();
25 |
26 | // access table
27 | msql.query("SELECT * FROM " + tableName);
28 | while (msql.next()){
29 | // replace "first_name" and "last_name" with column names from your table
30 | String s1 = msql.getString("first_name");
31 | String s2 = msql.getString("last_name");
32 | println(s1 + " " + s2);
33 | }
34 | } else {
35 | println("Yikes, there was an error!");
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/examples/PostgreSQL_example1/PostgreSQL_example1.pde:
--------------------------------------------------------------------------------
1 | // updated fjenett 20081129
2 |
3 | import de.bezier.data.sql.*;
4 |
5 |
6 | PostgreSQL pgsql;
7 |
8 |
9 | void setup()
10 | {
11 | size( 100, 100 );
12 |
13 | // this example assumes that you are running the
14 | // postgresql server locally (on "localhost").
15 | //
16 |
17 | // replace with your own postgresql-account.
18 | //
19 | String user = "fjenett";
20 | String pass = "fjenett";
21 |
22 | // name of the database to use
23 | //
24 | String database = "test";
25 |
26 | // connect to database on "localhost"
27 | //
28 | pgsql = new PostgreSQL( this, "localhost", database, user, pass );
29 |
30 | // connected?
31 | if ( pgsql.connect() )
32 | {
33 | // query the number of entries in table "weather"
34 | pgsql.query( "SELECT COUNT(*) FROM weather" );
35 |
36 | // results found?
37 | if ( pgsql.next() )
38 | {
39 | // nice, then let's report them back
40 | println( "number of rows in table weather: " + pgsql.getInt(1) );
41 | }
42 |
43 | // now let's query for last 10 entries in "weather"
44 | pgsql.query( "SELECT * FROM weather LIMIT 10" );
45 |
46 | // anything found?
47 | while( pgsql.next() )
48 | {
49 | // splendid, here's what we've found ..
50 | println( pgsql.getString("city") );
51 | }
52 | }
53 | else
54 | {
55 | // yay, connection failed !
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | This library wraps around JDBC drivers to let you access MySQL, SQLite and PostgreSQL databases.
2 |
3 | ## Latest Release (0.3.2)
4 |
5 | This fork has been modified slightly for Processing 3. It's now available in the Contribution Manager in the PDE, or you can install manually by unzipping this folder into your libraries folder:
6 | https://github.com/fjenett/sql-library-processing/raw/latest/release/BezierSQLib.zip
7 |
8 | ## Features
9 |
10 | It's not an ORM (and will not become one) but it has some handy features
11 | since v0.2.0 that makes it easier to load and save objects to a database.
12 |
13 | setFromRow(object)
14 | saveToDatabase(object)
15 | insertUpdateIntoDatabase(table, columns, values)
16 |
17 | See:
18 | https://raw.github.com/fjenett/sql-library-processing/master/src/de/bezier/data/sql/SQL.java
19 |
20 | ## Database Drivers
21 |
22 | Parts of this library are available under their own licenses. These are redistributed as downloaded from the original sources:
23 |
24 | MySQL Connector/J (JDBC driver)
25 | mysql-connector-java-3.1.8-bin.jar
26 | http://dev.mysql.com/downloads/connector/j/
27 | http://dev.mysql.com/downloads/connector/j/3.1.html
28 | GPL, http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
29 |
30 | PostgreSQL JDBC driver
31 | postgresql-8.3-604.jdbc3.jar
32 | http://jdbc.postgresql.org/
33 | http://jdbc.postgresql.org/download.html
34 | BSD, http://jdbc.postgresql.org/license.html
35 |
36 | SQLite JDBC driver
37 | sqlite-jdbc-3.7.2.jar
38 | http://code.google.com/p/sqlite-jdbc/
39 | Apache License 2.0, http://www.apache.org/licenses/LICENSE-2.0
40 |
--------------------------------------------------------------------------------
/examples/MySQL_example1/MySQL_example1.pde:
--------------------------------------------------------------------------------
1 | /**
2 | * MySQL example 1
3 | * https://github.com/fjenett/sql-library-processing
4 | *
5 | * created 2005-05-10 by fjenett
6 | * updated fjenett 20130718
7 | * tested with Processing 2.0.x
8 | */
9 |
10 | import de.bezier.data.sql.*;
11 |
12 | MySQL msql;
13 |
14 |
15 | void setup()
16 | {
17 | size( 100, 100 );
18 |
19 | // this example assumes that you are running the
20 | // mysql server locally (on "localhost")
21 |
22 | // 1
23 | // replace your mysql login:
24 |
25 | String user = "sql_user";
26 | String pass = "sql_pass";
27 |
28 | // 2
29 | // name of the database to use
30 |
31 | String database = "sql_library_test_db";
32 |
33 | // add additional parameters like this:
34 | // sql_library_test_db?useUnicode=true&characterEncoding=UTF-8
35 |
36 | // 3
37 | // connect to database of server "localhost"
38 |
39 | msql = new MySQL( this, "localhost", database, user, pass );
40 |
41 | if ( msql.connect() )
42 | {
43 | msql.query( "SELECT COUNT(*) FROM %s", "example1" );
44 | msql.next();
45 | println( "this table has " + msql.getInt(1) + " number of rows" );
46 | }
47 | else
48 | {
49 | // connection failed !
50 |
51 | // - check your login, password
52 | // - check that your server runs on localhost and that the port is set right
53 | // - try connecting through other means (terminal or console / MySQL workbench / ...)
54 | }
55 | }
56 |
57 | void draw()
58 | {
59 | // i know this is not really a visual sketch ...
60 | }
61 |
--------------------------------------------------------------------------------
/src/de/bezier/data/sql/mapper/UnderScoreToCamelCaseMapper.java:
--------------------------------------------------------------------------------
1 | package de.bezier.data.sql.mapper;
2 |
3 | /**
4 | * UnderScoreToCamelCaseMapper, does as it says.
5 | */
6 | public class UnderScoreToCamelCaseMapper implements NameMapper
7 | {
8 | public String backward ( String name )
9 | {
10 | String newName = "";
11 | for ( int i = 0, k = name.length(); i < k; i++ )
12 | {
13 | String c = name.charAt(i) + "";
14 | if ( c.toUpperCase().equals(c) && !c.toLowerCase().equals(c) ) {
15 | if ( i > 0 && i < k-1 )
16 | c = "_" + c.toLowerCase();
17 | else
18 | c = c.toLowerCase();
19 | }
20 | newName += c;
21 | }
22 | return newName;
23 | }
24 |
25 | public String forward ( String name )
26 | {
27 | String[] pieces = name.split("_");
28 | String newName = pieces[0];
29 | for ( int i = 1; i < pieces.length; i++ )
30 | {
31 | if ( pieces[i] != null && pieces[1].length() > 0 )
32 | {
33 | newName += pieces[i].substring(0,1).toUpperCase() +
34 | pieces[i].substring(1);
35 | }
36 | }
37 | return newName;
38 | }
39 |
40 | public static void main ( String ... args )
41 | {
42 | String[] test = new String[]{
43 | "created_at",
44 | "created_at_and_else",
45 | "rank_1",
46 | "_rank_abc",
47 | "rank_abc_",
48 | "camelCase_and_more"
49 | };
50 | UnderScoreToCamelCaseMapper mapper = new UnderScoreToCamelCaseMapper();
51 | for ( String t : test )
52 | {
53 | String fwd = mapper.forward(t);
54 | System.out.println( t + " -> " + fwd );
55 | String back = mapper.backward(fwd);
56 | System.out.println( fwd + " -> " + back );
57 | System.out.println( t.equals(back) );
58 | System.out.println( "" );
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/src/de/bezier/data/sql/MySQL.java:
--------------------------------------------------------------------------------
1 | package de.bezier.data.sql;
2 |
3 | import processing.core.*;
4 | import java.util.ArrayList;
5 |
6 | /**
7 | * MySQL wrapper for SQL library for Processing 2+
8 | *
9 | * A wrapper around some of sun's java.sql.* classes
10 | * and the "com.mysql.jdbc.Driver" driver by mysql.com (GPL).
11 | *
12 | * see:
13 | * - http://www.mysql.com/products/connector/j/
14 | * - http://java.sun.com/products/jdbc/
15 | *
16 | *
17 | * @author Florian Jenett - mail@florianjenett.de
18 | *
19 | * created: 07.05.2005 - 12:46 Uhr
20 | * modified: 2012-02
21 | *
22 | */
23 |
24 | public class MySQL
25 | extends de.bezier.data.sql.SQL
26 | {
27 | public MySQL ( PApplet _papplet, String _database )
28 | {
29 | // should not be used
30 | }
31 |
32 | /**
33 | * Creates a new MySQL connection.
34 | *
35 | * @param _papplet Normally you'd pass "this" in for your sketch
36 | * @param _server The server running the database, try "localhost"
37 | * @param _database Name of the database
38 | * @param _user Username for that database
39 | * @param _pass Password for user
40 | */
41 |
42 | public MySQL ( PApplet _papplet, String _server, String _database, String _user, String _pass)
43 | {
44 | super( _papplet, _server, _database, _user, _pass );
45 | init();
46 | }
47 |
48 | private void init ()
49 | {
50 | this.driver = "com.mysql.cj.jdbc.Driver";
51 | this.type = "mysql";
52 |
53 | this.url = "jdbc:" + type + "://" + server + "/" + database;
54 | }
55 |
56 | public String[] getTableNames ()
57 | {
58 | if ( tableNames == null )
59 | {
60 | tableNames = new ArrayList();
61 | query( "SHOW TABLES" );
62 | while ( next() ) {
63 | tableNames.add( getObject("Tables_in_"+database).toString() );
64 | }
65 | }
66 | return tableNames.toArray(new String[0]);
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/src/de/bezier/data/sql/SQLite.java:
--------------------------------------------------------------------------------
1 | package de.bezier.data.sql;
2 |
3 | import processing.core.*;
4 | import java.util.ArrayList;
5 |
6 | /**
7 | * SQLite wrapper for SQL library for Processing 2+
8 | *
9 | * A wrapper around some of sun's java.sql.* classes
10 | * and the pure java "org.sqlite.JDBC" driver of the Xerial project (Apache 2 license).
11 | *
48 | a library for the programming environment processing.
49 | last update, ##date##.
50 |
51 |
52 | SQLibrary lets you communicate with a MySQL, PostgreSQL or SQLite databases.
53 |
54 |
55 | please note: working with a remote database in a plublicly accessible applet is highly insecure.
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
Download
64 |
65 |
66 | Get ##yourLibrary## version ##versionNumber## in .zip format
67 |
68 |
69 |
Installation
70 |
71 |
72 | Before trying to use this library with any database make sure you have that up and running.
73 | the library is just a wrapper to help connect to already installed and running databases (MySQL, SQLite, PostgreSQL).
74 |
75 |
76 | Installation in Processing 2.0 should be as easy as opening the "Library Manager" from the menu at:
77 | Sketch > Import Library ... > Add Library ... > (select ##yourLibrary## and click "install")
78 |
79 |
80 | Manual installation (Processing 1.5 and earlier):
81 |