CodeGen_MySQL_UDF
[ class tree: CodeGen_MySQL_UDF ] [ index: CodeGen_MySQL_UDF ] [ all elements ]

Class: CodeGen_MySQL_UDF_Element_Function

Source Location: /CodeGen_MySQL_UDF-1.0.0RC1/MySQL/UDF/Element/Function.php

Class Overview

CodeGen_Element
   |
   --CodeGen_MySQL_UDF_Element_Function

Class describing a function within a UDF extension


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 2005-2008 Hartmut Holzgraefe

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 38]
Class describing a function within a UDF extension


[ Top ]


Class Variables

$addCode =

[line 464]

Code snippet for aggregate add function
  • Access: protected

Type:   string


[ Top ]

$clearCode =

[line 488]

Code snippet for aggregate clear function
  • Access: protected

Type:   string


[ Top ]

$code =  ""

[line 381]

Code snippet
  • Access: protected

Type:   string


[ Top ]

$dataElements = array()

[line 342]

Private data elements
  • Access: protected

Type:   array


[ Top ]

$decimals =  false

[line 147]

decimal digits for REAL return values
  • Access: protected

Type:   mixed


[ Top ]

$deinitCode =

[line 421]

Code snippet for deinit function
  • Access: protected

Type:   string


[ Top ]

$initCode =

[line 401]

Code snippet for init function
  • Access: protected

Type:   string


[ Top ]

$length =  false

[line 122]

max. Length of return value
  • Access: protected

Type:   mixed


[ Top ]

$mandatoryParams =  0

[line 244]

Number of mandatory parameters
  • Access: protected

Type:   int


[ Top ]

$name =  "unknown"

[line 46]

The function name
  • Access: protected

Type:   string


[ Top ]

$null =  0

[line 172]

Function may return NULL values?
  • Access: protected

Type:   bool


[ Top ]

$optionalParams =  0

[line 251]

Number of optional parameters
  • Access: protected

Type:   int


[ Top ]

$params = array()

[line 237]

Function parameters
  • Access: protected

Type:   array


[ Top ]

$resultCode =

[line 513]

Code snippet for aggregate result function
  • Access: protected

Type:   string


[ Top ]

$returns =  "string"

[line 191]

Function returntype
  • Access: protected

Type:   string


[ Top ]

$startCode =

[line 441]

Code snippet for aggregate start function
  • Access: protected

Type:   string


[ Top ]

$testCode =  ""

[line 1006]

test code snippet
  • Access: protected

Type:   string


[ Top ]

$testDescription =  ""

[line 1062]

test code description
  • Access: protected

Type:   string


[ Top ]

$testResult =  ""

[line 1034]

expected test result string
  • Access: protected

Type:   array


[ Top ]

$totalParams =  0

[line 258]

Total number of parameters
  • Access: protected

Type:   int


[ Top ]

$type =  "normal"

[line 92]

Function type: normal or aggregate
  • Access: protected

Type:   string


[ Top ]



Method Detail

addDataElement   [line 352]

bool addDataElement( string $name, string $type, [stirng $default = false])

Add an element to the functions private data structure
  • Return: success status

Parameters:

string   $name     element name
string   $type     element type
stirng   $default     default value

[ Top ]

addParam   [line 269]

bool addParam( string $name, string $type, [string $optional = null], [string $default = null])

Add a function parameter to the parameter list
  • Return: success status

Parameters:

string   $name     parameter name
string   $type     parameter type
string   $optional     optional?
string   $default     default value

[ Top ]

addTestCode   [line 1013]

void addTestCode( string $code)

testCode setter

Parameters:

string   $code     code snippet

[ Top ]

addTestResult   [line 1041]

void addTestResult( string $text)

testResult setter

Parameters:

string   $text     result text

[ Top ]

cCode   [line 539]

string cCode( object Extension $extension)

Generate code for this user definend function
  • Return: C code

Parameters:

object Extension   $extension     object

[ Top ]

cData   [line 873]

string cData( )

Generate data structure definition for the functions private data
  • Return: C code

[ Top ]

cPrototype   [line 838]

string cPrototype( )

Generate function prototypes for this user definend function
  • Return: C code

[ Top ]

createStatement   [line 956]

string createStatement( object Extension $extension)

Return SQL CREATE FUNCTION statement for this function

Parameters:

object Extension   $extension     to generate for

[ Top ]

createTest   [line 1107]

object generated createTest( CodeGen_MySQL_UDF_Extension $extension)

Create test case for this function
  • Return: test case
  • Access: public

Parameters:

object extension   $extension     the function is part of

[ Top ]

docbook   [line 1135]

string docbook( $extension)

Genereate docbook <refentry> for this function

Parameters:

   $extension     

[ Top ]

dropIfExistsStatement   [line 992]

string dropIfExistsStatement( object Extension $extension)

Return SQL conditional DROP FUNCTION statement for this function

Parameters:

object Extension   $extension     to generate for

[ Top ]

dropStatement   [line 978]

string dropStatement( object Extension $extension)

Return SQL DROP FUNCTION statement for this function

Parameters:

object Extension   $extension     to generate for

[ Top ]

getDefSymbols   [line 1190]

array getDefSymbols( )

Get export symbols for .def file

[ Top ]

getName   [line 76]

string getName( )

Name getter
  • Return: function name

[ Top ]

getTestCode   [line 1023]

string getTestCode( )

testCode getter

[ Top ]

getTestDescription   [line 1079]

string getTestDescription( )

testDescription getter

[ Top ]

getTestResult   [line 1051]

string getTestResult( )

testResult getter

[ Top ]

returnType   [line 901]

string returnType( )

The C return type of this function
  • Return: C code

[ Top ]

setAddCode   [line 472]

bool setAddCode( string $code)

Function aggregate add code setter
  • Return: success status

Parameters:

string   $code     C code snippet

[ Top ]

setClearCode   [line 496]

bool setClearCode( string $code)

Function aggregate clear code setter
  • Return: success status

Parameters:

string   $code     C code snippet

[ Top ]

setCode   [line 389]

bool setCode( string $text)

Function code setter
  • Return: success status

Parameters:

string   $text     C code snippet

[ Top ]

setDecimals   [line 155]

bool setDecimals( mixed $decimals)

Decimals setter
  • Return: success status

Parameters:

mixed   $decimals     max. lengt as int or flase if not applicable

[ Top ]

setDeinitCode   [line 429]

bool setDeinitCode( string $code)

Function deinit code setter
  • Return: success status

Parameters:

string   $code     C code snippet

[ Top ]

setInitCode   [line 409]

bool setInitCode( string $code)

Function init code setter
  • Return: success status

Parameters:

string   $code     C code snippet

[ Top ]

setLength   [line 130]

bool setLength( mixed $length)

Length setter
  • Return: success status

Parameters:

mixed   $length     max. lengt as int or flase if not applicable

[ Top ]

setName   [line 54]

bool setName( string $name)

Name setter
  • Return: success status

Parameters:

string   $name     function name

[ Top ]

setNull   [line 180]

bool setNull( bool $null)

NULL setter
  • Return: success status

Parameters:

bool   $null     truth value

[ Top ]

setResultCode   [line 521]

bool setResultCode( string $code)

Function aggregate result code setter
  • Return: success status

Parameters:

string   $code     C code snippet

[ Top ]

setReturns   [line 202]

bool setReturns( string $returns)

Return type setter

one of "string", "int", "real", or "datetime"

  • Return: success status

Parameters:

string   $returns     return type

[ Top ]

setStartCode   [line 449]

bool setStartCode( string $code)

Function aggregate start code setter
  • Return: success status

Parameters:

string   $code     C code snippet

[ Top ]

setTestDescription   [line 1069]

void setTestDescription( string $text)

testDescritpion setter

Parameters:

string   $text     text

[ Top ]

setType   [line 100]

bool setType( string $type)

Function type setter
  • Return: success status

Parameters:

string   $type     "normal" or "aggregate"

[ Top ]

signature   [line 927]

string signature( void 0)

Return SQL function signature of this UDF

Parameters:

void   0     

[ Top ]

writeTest   [line 1091]

void writeTest( CodeGen_MySQL_UDF_Extension $extension)

write test case for this function
  • Access: public

Parameters:

class   $extension     Extension extension the function is part of

[ Top ]


Documentation generated on Fri, 13 Feb 2009 13:01:01 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.