Skip to content

Latest commit

 

History

History
80 lines (47 loc) · 1.92 KB

File metadata and controls

80 lines (47 loc) · 1.92 KB

iBoxDB.Java

Traditional table with unstructured data, pure java database, not only CURD and QL, but also Hot Replication and MVCC, for both Java and Android, compatible with node.js

features: CURD, Index, composite Index, query language, transactions support, concurrency control, memory management, hot replication, file and in-memory database, dynamic columns, NoSQL ORM, high performance, zero configuration, copy and run.

Examples:

Normal Object

Member m = new Member();
m.ID = box.newId(Member.IncTableID, 1);
m.setName("Andy");
m.setTags(new Object[] { "Nice", "Strong" });
box.insert("Table", m);

Dynamic Object (document database)

game.put("GameType", "ACT");
box.insert("Table", game);

Key-Value Style Query

box.bind("Table", ID).select( Member.class );
//Composite-Key Supported
box.bind("Table2",8, "MyID").select(Product.class);

SQL like Query

box.select( Member.class, "from Member where Name==?", "MyName" );

Custom DatabaseFunction use java

public static class QueryArray implements IFunction {
		String match;

		public QueryArray(String match) {
			this.match = match;
		}

		public Object execute(int argCount, Object[] args) {
			Object[] tags = (Object[]) args[0];
			if (tags == null) {
				return false;
			}
			for (Object t : tags) {
				if (match.equals(t)) {
					return true;
				}
			}
			return false;
		}
	}
	
box.select(Member.class, "from Member where [Tags]",  new QueryArray("Strong")

Replication Master-Slave , Master-Master

Benchmark with MongoDB

Dual-Core

iBoxDB JAVA Version

iBoxDB NET Version