From: Date: August 15 2008 2:32pm Subject: svn commit - mysqldoc@docsrva: r11564 - trunk/ndbapi List-Archive: http://lists.mysql.com/commits/51728 Message-Id: <200808151232.m7FCWsIR012884@docsrva.mysql.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Author: jstephens Date: 2008-08-15 14:32:53 +0200 (Fri, 15 Aug 2008) New Revision: 11564 Log: NdbInterpretedCode - Short descriptions Modified: trunk/ndbapi/class-ndb-interpretedcode.xml Modified: trunk/ndbapi/class-ndb-interpretedcode.xml =================================================================== --- trunk/ndbapi/class-ndb-interpretedcode.xml 2008-08-15 09:13:58 UTC (rev 11563) +++ trunk/ndbapi/class-ndb-interpretedcode.xml 2008-08-15 12:32:53 UTC (rev 11564) Changed blocks: 5, Lines Added: 92, Lines Deleted: 49; 10479 bytes @@ -3,7 +3,7 @@ %all.entities; ]> -
+
The <literal>NdbInterpretedCode</literal> Class @@ -144,172 +144,170 @@ NdbInterpretedCode() - + Class constructor load_const_null() - + Load a NULL value into a register load_const_u16() - + Load a 16-bit numeric value into a register load_const_u32() - + Load a 32-bit numeric value into a register load_const_u64() - + Load a 64-bit numeric value into a register read_attr() - + Read a register value into a table column write_attr() - + Write a table column value into a register add_reg() - + Add two register values and store the result in a third register sub_reg() - + Subtract two register values and store the result in a third register def_label() - + Create a label for use within the interpreted program branch_label() - + Unconditional jump to a label branch_ge() - + Jump if one register value is greater than or equal to another branch_gt() - + Jump if one register value is greater than another branch_le() - + Jump if one register value is less than or equal to another branch_lt() - + Jump if one register value is less than another branch_eq() - + Jump if one register value is equal to another branch_ne() - + Jump if one register value is not equal to another branch_ne_null() - + Jump if a register value is not NULL branch_eq_null() - + Jump if a register value is NULL branch_col_eq() - + Jump if a column value is equal to another branch_col_ne() - + Jump if a column value is not equal to another branch_col_lt() - + Jump if a column value is less than another branch_col_le() - + Jump if a column value is less than or equal to another branch_col_gt() - + Jump if a column value is greater than another branch_col_ge() - + Jump if a column value is greater than or equal to another branch_col_eq_null() - + Jump if a column value is NULL branch_col_ne_null() - + Jump if a column value is not NULL branch_col_like() - + Jump if a column value matches a pattern branch_col_notlike() - + Jump if a column value does not match a pattern interpret_exit_ok() - + Return a row as part of the result interpret_exit_nok() - + Do not return a row as part of the result interpret_last_row() - + Return a row as part of the result, and do not check any more rows in + this fragment add_val() - + Add a value to a table column value sub_val() - + Subtract a value from a table column value def_sub() - + Define a subroutine call_sub() - + Call a subroutine ret_sub() - + Return from a subroutine finalise() - + Completes interpreted program and prepares it for use getTable() - + Gets the table on which the program is defined getNdbError() - + Gets the most recent error associated with this + NdbInterpretedCode object getWordsUsed() - + Gets the number of words used in the buffer - - - - @@ -369,7 +367,10 @@ Description - + + This is the NdbInterpretedCode class + constuctor. + @@ -379,7 +380,12 @@ - +NdbInterpretedCode + ( + const NdbDictionary::Table* table = 0, + Uint32* buffer = 0, + Uint32 buffer_word_size = 0 + ) @@ -390,7 +396,44 @@ Parameters - None. + The NdbInterpretedCode constructor takes + three parameters, as described here: + + + + + + The table against which which + this program is to be be run. This parameter must be + supplied if the program is table-specific — that + is, if it reads from or writes to columns in a table. + + + + + + A pointer to a buffer of + 32-bit words used to store the program. + + + + + + buffer_word_size is the + length of the buffer passed in. If the program exceeds + this length then adding new instructions will fail with + error 4518 Too many instructions in + interpreted program. + + + + Alternatively, if no buffer is passed, a buffer will be + dynamically allocated internally and extended to cope as + instructions are added. + + + +