rasqal_new_variable

Name

rasqal_new_variable --  Constructor - Create a new Rasqal normal variable

Synopsis

rasqal_variable* rasqal_new_variable (rasqal_query* rq, unsigned char * name, rasqal_literal * value);

Arguments

rq

rasqal_query to associate the variable with

name

variable name

value

variable rasqal_literal value (or NULL)

Description

The variable must be associated with a query, since variable names are only significant with a single query.

This creates a regular variable that can be returned of type RASQAL_VARIABLE_TYPE_NORMAL. Use rasqal_new_variable_typed to create other variables.

The name and value become owned by the rasqal_variable structure

Return value

a new rasqal_variable or NULL on failure.