-
Notifications
You must be signed in to change notification settings - Fork 11
Getting Started
Bruce Yang CL edited this page Jan 23, 2021
·
3 revisions
DB db = new DB();
db.ensureTable(Record.class, "table", "id");
AutoBox auto = db.open();
//insert
auto.insert("table", new Record(1L, "Andy"));
//select
Record o1 = auto.get(Record.class, "table", 1L);
//update
o1.name = "Kelly";
auto.update("Table", o1); boolean
Boolean
byte
Byte
char
Character
short
Short
int
Integer
long
Long
float
Float
double
Double
UUID
Date
//dynamic length @BoxLength(len)
BigDecimal
BigInteger
String
//Non-Indexable
byte[]
HashMap<String,Object>
Object[] import iboxdb.localserver.*;
import iboxdb.localserver.io.*;
import java.io.File;
@WebListener()
public class StartListener implements ServletContextListener {
@Override
public void contextInitialized(ServletContextEvent sce) {
String path = sce.getServletContext().getRealPath("/") + "DB" + File.separatorChar;
BoxFileStreamConfig.RootPath = path;
File f = new File(BoxFileStreamConfig.RootPath );
if (!f.exists()) {
f.mkdir();
}
System.out.println("DBPath=" + f.getPath());
}
}[Condition:] == != < <= > >= & | ( )
[IFunction:] =[F1,F2,F3]
//query
box.select( Member.class, "from Member");
//query load to memory first, start with '*'
box.select( Member.class, "*from Member");
//selecting tracer, start with '!'
box.select( Member.class, "!from Member"); Goto WebSite www.iboxdb.com