Skip to content
feiben edited this page Jun 26, 2016 · 11 revisions

Records may coming from a network channel or a local invocation. LunarBase packs records into an internal object IncommingRecords(records_array), and send it to task center. Then default executor recognize this object and just save them to storage. Task center returns failure records, programmer must handle it himself.

All the records are constructed as Strings, and are in this format:

		String[] records = new String[n];
		records[0] = "{name=jackson, payment=500, age=36}";
		records[1] = "{name=jackson, payment=900, age=25, commnet=[\" jackson has payed 5 times this week to buy this phone, it is weired, please confirm with Jackson if his account is used by himself.\"]}";
		records[2] = "{name=John, payment=600, age=36, comment=[\" John win his coupon as a faithful client, send him the gift by this weekend.\"]}";
		......

There are two modes we can go forward:

LunarTable.addSearchable("int","payment");

which tells LunarBase that on the column "payment", we can perform point query like "payment=500", or range query "payment > 100 AND payment < 1000".

And the other much powerful mode:

LunarTable.addFulltextSearchable("comment");

Then LunarBase accepts keywords like "win, client, gift,..." and returns you the results whose column "comment" has content containing these keywords.

#Reserved characters

=
[\"
\"]
,
{
}

Any characters appear within the pair [\" \"] will be ignored, including the reserved ones. But if a column contains incomplete inclusion, it will cause severe error in parsing: [\" [\" \"] or [\" \"] \"].

Clone this wiki locally