dannote / mod-ndb

Automatically exported from code.google.com/p/mod-ndb
0 stars 0 forks source link

General interpreted expressions #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It is possible for NDB to evaluate expressions involving columns, constants, 
request parameters, 
and basic operators on the data nodes.

The implementations in NdbScanFilter and NdbOperation::incValue() can serve as 
a basic 
reference.  Mod_ndb would parse an expression into an efficient intermediate 
representation, 
and then use the intermediate form at runtime to create the interpreted code.  

The basic operations of NDB's virtual machine are listed in NdbOperation.hpp:

- LOAD/STORE 
-- add_reg() / sub_req(): add or subtract two registers and place the result in 
a third
-- load_const_u32() / load_const_u64() / load_const_null() : load a constant 
into a register
-- read_attr():  read an attribute into a register
-- write_attr(): write an attribute from a register
- BRANCHING
-- def_lable(): define a label
-- branch_label: unconditional branch
-- REGISTER BRANCHES:
--- branch_gt, branch_lt, etc: compare two registers and branch if true
--- branch_ne_null, branch_eq_null: compare a register to null
-- COLUMN BRANCHES 
--- branch_col_lt, branch_col_gt, etc. -- use memcmp -- can compare a column to 
a string.
--- branch_col_ne_null, branch_col_eq_null
--- branch_col_like, branch_coll_notlike
- SUBROUTINES:
-- def_subroutine(), call_sub(), ret_sub()
- EXIT VALUES:
-- exit OK or NOT OK 

Original issue reported on code.google.com by john.david.duncan on 23 Aug 2007 at 5:06

GoogleCodeExporter commented 9 years ago

Original comment by john.david.duncan on 2 Sep 2007 at 5:21

GoogleCodeExporter commented 9 years ago
On 20 April 2008 Monty Taylor told me that the current interpreter in NDB is 
probably going away, and it may or 
may not be reimplemented.

Original comment by j...@mysql.com on 4 May 2008 at 3:41

GoogleCodeExporter commented 9 years ago

Original comment by john.david.duncan on 4 May 2008 at 4:11