www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Overview
Installation Guide
Quick Start & Tours
Sample ODBC & JDBC Applications
Conceptual Overview
Server Administration
Conductor Administration Interface
Data Access Interfaces
SQL Reference
SQL Procedure Language Guide
Database Event Hooks
Data Replication, Synchronization and Transformation Services
Web Application Development
XML Support
RDF Database and SPARQL
Web Services
Runtime Hosting
Internet Services
Free Text Search
TPC C Benchmark Kit
Using Virtuoso with Tuxedo
Appendix
Virtuoso Functions Guide

OpenLink Virtuoso Universal Server: Documentation - Function Index

integer __any_grants (in tablename varchar);
Checks a table for grants.
abs (in num any);
Return the absolute value of a number
acos (in x double precision);
trigonometric functions
boolean and ( val1 boolean, val2 boolean, ... , valN boolean);
Returns false if a value of some argument is false, otherwise returns true.
sequence append ( seq1 sequence, seq2 sequence, ... , seqN sequence);
Creates an sequence of all items from given sequences.
aref ( arg any, nth integer);
returns specific element of an array or string
integer ascii ( arg any);
Get ASCII value of a character
aset (in arg any, in nth integer, in new_elem any);
set array element
asin (in x double precision);
trigonometric functions
null assign ( var_name string, var_value any);
Creates a local variable and assign a value to it.
atan (in x double precision);
trigonometric functions
atan2 (in x double precision, in y double precision);
trigonometric functions
atof (in arg string);
Convert a string to single precision float
atoi (in arg string);
Convert a string to an integer
varchar att_local_name (in dsn varchar, in table varchar);
Compose a fully qualified table name based on DSN and remote table name.
number avg ( arg1 any, arg2 any, ... , argN any);
Returns average value of all its arguments.
backup (in file varchar);
Write data into transaction log format for backup purposes. Deprecated.
Write data into transaction log format for backup purposes. Deprecated.
Clears the backup context and marks all pages in checkpoint space as ready for online backup
Write data into transaction log format for backup purposes. Deprecated.
int backup_online (in file_prefix varchar, in pages integer, [in timeout integer], [in dirs any]);
perform online backup of database
backup_prepare (in file varchar);
Write data into transaction log format for backup purposes. Deprecated.
backup_row (in row any);
Write data into transaction log format for backup purposes. Deprecated.
caddr_t bif_arg (caddr_t * qst , state_slot_t ** args , int nth , char * func );
Get parameters for built in function
caddr_t bif_array_arg (caddr_t * qst , state_slot_t ** args , int nth , char * func );
Get parameters for built in function
caddr_t bif_array_or_null_arg (caddr_t * qst , state_slot_t ** args , int nth , char * func );
Get parameters for built in function
caddr_t bif_bin_arg (caddr_t * qst , state_slot_t ** args , int nth , char * func );
Get parameters for built in function
caddr_t bif_double_arg (caddr_t * qst , state_slot_t ** args , int nth , char * func );
Get parameters for built in function
caddr_t bif_entity_arg (caddr_t * qst , state_slot_t ** args , int nth , char * func );
Get parameters for built in function
caddr_t bif_float_arg (caddr_t * qst , state_slot_t ** args , int nth , char * func );
Get parameters for built in function
caddr_t bif_long_arg (caddr_t * qst , state_slot_t ** args , int nth , char * func );
Get parameters for built in function
caddr_t bif_long_or_char_arg (caddr_t * qst , state_slot_t ** args , int nth , char * func );
Get parameters for built in function
caddr_t bif_string_arg (state_slot_t ** args , int nth , char * func );
Get parameters for built in function
caddr_t bif_string_or_null_arg (caddr_t * qst , state_slot_t ** args , int nth , char * func );
Get parameters for built in function
caddr_t bif_string_or_wide_or_null_arg (caddr_t * qst , state_slot_t ** args , int nth , char * func );
Get parameters for built in function
caddr_t bif_strses_arg (caddr_t * qst , state_slot_t ** args , int nth , char * func );
Get parameters for built in function
bit_and (in n1 integer, in n2 integer);
Returns bitwise AND of two 32-bit integers.
bit_not (in n1 integer);
Returns bitwise NOT of a 32-bit integer.
bit_or (in n1 integer, in n2 integer);
Returns bitwise OR of two 32-bit integers.
bit_shift (in value integer, in distance integer);
Returns the result of bitwise shift operation over two 32-bit integers.
bit_xor (in n1 integer, in n2 integer);
Returns bitwise XOR (exclusive "or") of two 32-bit integers.
Convert a blob to string
Convert a blob to string session
any bookmark (in cursor CURSOR);
Return the bookmark for current row of a scrollable cursor
Converts its argument to boolean
BPEL.BPEL.compile_script (in scp_id int, in vdir varchar (default null), in opts any (default null), in no_check int (default 0));
Compile a BPEL script source
BPEL.BPEL.copy_script (in scp_id int);
Makes a copy of an existing script
Returns a list of partner links used in the BPEL script
BPEL.BPEL.getVariableData (in var_name varchar, in part varchar, in query varchar);
gets BPEL variable data within <bpelv:exec binding="SQL"> activity
BPEL.BPEL.import_script (in base_uri varchar, in base_name varchar, in scp_id int);
Import a new BPEL process
delete a BPEL process instance
BPEL.BPEL.plink_get_option (in script varchar, in plink varchar, in opt varchar);
retrieving a partner link option
BPEL.BPEL.plink_set_option (in script varchar, in plink varchar, in opt varchar, in val any);
set value of a partner link option
BPEL.BPEL.purge_instance (in completed_before datetime, in make_archive int (default 1));
removes old BPEL process instances
BPEL.BPEL.script_delete (in script varchar, in delete_instances int);
Remove a BPEL process
BPEL.BPEL.script_obsolete (in script varchar);
mark a BPEL script as obsoleted
BPEL.BPEL.script_source_update (in scp_id int, in url varchar, in content any);
Updates an existing script in BPEL repository
BPEL.BPEL.script_upload (in name varchar, in url varchar, in content any);
Upload a new BPEL script source
BPEL.BPEL.setVariableData (in var_name varchar, in value any, in part varchar, in query varchar);
sets BPEL variable data within code invoked from <bpelv:exec binding="SQL"> activity
BPEL.BPEL.wsdl_upload (in scp_id int, in url varchar, in content any, in pl varchar default 'wsdl');
Uploads a WSDL description for a given BPEL script
ceiling (in x double precision);
Round a number to positive infinity.
integer ceiling ( num number);
Returns the smallest integer that is not less than the argument.
cfg_item_count (in path varchar, in section varchar);
return number of items in a section in configuration file
cfg_item_name (in path varchar, in section varchar, in item_index integer);
get nth item name from ini file
cfg_item_value (in path varchar, in section varchar, in item_name varchar);
returns the value of an item from the ini file
cfg_section_count (in path varchar);
get number of sections in an INI file
cfg_section_name (in path varchar, in index integer);
returns INI file section name
cfg_write (in path varchar, in section varchar, in item_name varchar, in item_value varchar);
Writes the item=value to an INI file
charset_define (in name varchar, in charset_string any, in aliases any);
Define a character set.
any charset_recode (in src_string varchar/nvarchar, in src_charset varchar, in dst_charset varchar);
Translate a string to another character set
any charsets_list (in gen_res_set integer);
List known character set names and aliases.
integer checkpoint_interval (in minutes integer);
Configure database checkpointing
varchar chr (in chr_codelong);
Convert a long character code to a character or wide character
varchar client_attr (in attr varchar);
returns a varchar containing the requested information from the connection
collation_define (in COLLATION_NAME varchar, in FILE_PATH varchar, in ADD_TYPE integer);
define a new collation
varchar complete_table_name (in tablename varchar, in mode integer);
Returns a fully qualified table name.
create a composite object
integer composite_ref (in c any, in nth integer);
get member of a composite object
concat ( str1 varchar, str2 varchar, ... , strn varchar);
Concatenate strings
string concat ( strg1 string, strg2 string, ... , strgN string);
Returns the concatenation of its arguments.
string concatenate (in arg_1 any, ... );
concatenate strings
any connection_get (in name varchar);
Get connection variable
get connection identifier
check if current session connection variables have been altered
connection_set (in name varchar, in value any);
Associates a value to the name in the context of the present connection
Retrieve all connection variables
connection_vars_set (in var_array any);
set all connection variables
boolean contains ( column varchar, expression varchar, [opt_or_valueinteger]);
A text contains predicate
boolean contains ( haystack string, needle string);
Returns true if the first argument string contains the second argument string, and otherwise returns false.
numeric CORR (in expr1 any, in expr2 any);
Returns the coefficient of correlation of a set of number pairs.
cos (in x double precision);
trigonometric functions
cot (in x double precision);
trigonometric functions
integer count ( seq any);
Returns the number of values in the sequence.
cov_load (in fname varchar);
Load test coverage data from file.
cov_report (in fname varchar, in outdir varchar);
Produce a text coverage report.
cov_store (in fname varchar, in add_comments integer);
Writes a test coverage to a file.
numeric COVAR_POP (in expr1 any, in expr2 any);
Returns the population covariance of a set of number pairs.
numeric COVAR_SAMP (in expr1 any, in expr2 any);
Returns the sample covariance of a set of number pairs.
attribute create-attribute ( attrname string, attrvalue string);
Creates a special "attribute descriptor" object.
entity create-comment ( comment-text string);
Creates a "comment" XML tree entity.
node create-element ( head sequence, child1 any, child2 any, ... , childN any);
Creates an element with specified name, attributes and children
entity create-pi ( piname string); ( pivalue string);
Creates a "processing instruction" XML tree entity.
XMLType createXML (in src any, [in schema_uri any], [in validated any], [in wellformed any]);
get current date and time
get current date and time
Returns a node-set that has the current node as its only member.
Get name of current charset.
get current date and time
dateadd (in unit string, in number integer, in date datetime);
arithmetic add to a date
datediff (in unit string, in date1 datetime, in date2 datetime);
get difference of 2 dates
datestring (in date datetime);
convert a datetime from internal to external date-time representation
datestring_gmt (in date datetime);
convert a datetime from internal to external date-time representation
datestring_GMT (in dt datetime);
convert a timestamp to external format string in GMT
integer DAV_ADD_GROUP (in gid varchar, in auth_uid varchar, in auth_pwd varchar);
Functions for manipulating an existing DAV collection or resource
integer DAV_ADD_USER (in uid varchar, in pwd varchar, in gid varchar, in permis varchar, in disable integer, in home varchar, in full_name varchar, in email varchar, in uid varchar, in auth_uid varchar, in auth_pwd varchar);
Functions for manipulating an existing DAV collection or resource
integer DAV_COL_CREATE (in path varchar, in permissions varchar, in uname varchar, in gname varchar, in auth_uname varchar, in auth_pwd varchar);
functions for adding, updating, deleting of DAV collections or resources
integer DAV_COPY (in path varchar, in destination varchar, in overwrite integer, in permissions varchar, in uname varchar, in gname varchar, in auth_uname varchar, in auth_pwd varchar);
Functions for manipulating an existing DAV collection or resource
integer DAV_DELETE (in path varchar, in silent integer, in auth_uname varchar, in auth_pwd varchar);
functions for adding, updating, deleting of DAV collections or resources
varchar DAV_DELETE_GROUP (in gid varchar, in auth_uid varchar, in auth_pwd varchar);
Functions for manipulating an existing DAV collection or resource
varchar DAV_DELETE_USER (in uid varchar, in auth_uid varchar, in auth_pwd varchar);
Functions for manipulating an existing DAV collection or resource
any DAV_DIR_LIST (in path varchar, in recursive integer, in auth_uid varchar, in auth_pwd varchar);
Functions for searching a DAV collection or resource
WS.WS. DAV_EXP (in host varchar, in url varchar, in root varchar, in dst varchar);
Export a retrieved Web site to another WebDAV enabled server
varchar DAV_HOME_DIR (in uid varchar);
Functions for manipulating an existing DAV collection or resource
integer DAV_IS_LOCKED (in id any, in type char(1), in owned_tokens any := 1);
Operations on locks of DAV collections and resources
integer DAV_LIST_LOCKS (in id any, in type char(1));
Operations on locks of DAV collections and resources
integer DAV_LOCK (in path varchar, in locktype varchar, in scope varchar, in token varchar, in owner_name varchar, in owned_tokens varchar, in depth varchar, in timeout_sec integer, in auth_uname varchar, in auth_pwd varchar);
Operations on locks of DAV collections and resources
varchar DAV_MOVE (in path varchar, in destination varchar, in overwrite integer, in auth_uname varchar, in auth_pwd varchar);
Functions for manipulating an existing DAV collection or resource
varchar DAV_PROP_REMOVE (in path varchar, in propname varchar, in silent integer, in auth_uname varchar, in auth_pwd varchar);
Functions for manipulating an existing DAV collection or resource
integer DAV_PROP_SET (in path varchar, in propname varchar, in propvalue any, in auth_uname varchar, in auth_pwd varchar);
Functions for manipulating an existing DAV collection or resource
varchar DAV_RES_UPLOAD (in path varchar, in content any, in type varchar, in permissions varchar, in uname varchar, in gname varchar, in auth_uname varchar, in auth_pwd varchar);
functions for adding, updating, deleting of DAV collections or resources
integer DAV_SEARCH_ID (in path varchar, in what char(1));
Functions for searching a DAV collection or resource
varchar DAV_SEARCH_PATH (in id integer, in what char(1));
Functions for searching a DAV collection or resource
any DAV_UNLOCK (in path varchar, in token varchar, in auth_uname varchar, in auth_pwd varchar);
Operations on locks of DAV collections and resources
dayname (in dt datetime);
decompose a datetime to its components
dayofmonth (in dt datetime);
decompose a datetime to its components
dayofmonth (in dt datetime);
get day of month from a datetime
dayofweek (in dt datetime);
decompose a datetime to its components
dayofweek (in dt datetime);
get day of week from a datetime
dayofyear (in dt datetime);
decompose a datetime to its components
dayofyear (in dt datetime);
get day of year from a datetime
Alters IRI_ID columns to get IRI_ID_8.
DB.DBA.RDF_AUDIT_METADATA ([in audit_mode integer], [in str_value varchar], [in graph_iri varchar]);
Fix RDF metadata corruption.
varchar DB.DBA.RDF_BACKUP_METADATA (in save_to_file integer := 0); (in backup_name varchar := null);
Makes a backup copy of RDF metadata (i.e., descriptions of RDF Views and the like).
DB.DBA.RDF_CONVERT_RDFXML_TO_TTL (in strg varchar, in base varchar, inout ttl_ses any);
Converts rdf xml to ttl.
DB.DBA.RDF_LANGMATCHES (in r varchar, in t varchar);
Returns 1 if language identifier r matches lang pattern t.
DB.DBA.RDF_LOAD_RDFXML (in rdfxml_text varchar, in omt_top_rdf varchar, in graph_uri varchar);
Parses the content of RDF/XML text as a sequence of separate RDF triples.
DB.DBA.RDF_LOAD_RDFXML_MT (in strg varchar, in base varchar, in graph varchar, [in log_mode integer], [in threads integer]);
Parses the content of large RDF/XML text as a sequence of separate RDF triples.
DB.DBA.RDF_QUAD_URI (in g_uri varchar, in s_uri varchar, in p_uri varchar, in o_uri varchar);
Performs simple insertion of a quad where object is a node.
DB.DBA.RDF_QUAD_URI_L (in g_uri varchar, in s_uri varchar, in p_uri varchar, in o_lit any);
Performs simple insertion of a quad where object is a literal value in 'SQL valmode'.
DB.DBA.RDF_QUAD_URI_L_TYPED (in g_uri varchar, in s_uri varchar, in p_uri varchar, in o_lit any, in dt any, in lang varchar);
Performs simple insertion of a quad where object is a literal value in 'SQL valmode' and can be specified datatype and language.
DB.DBA.RDF_REGEX (in s varchar, in p varchar, in call varchar := null);
Returns 1 if string s matches pattern p, 0 otherwise.
DB.DBA.RDF_RESTORE_METADATA (in read_from_file integer, in backup_name varchar);
Restores RDF metadata (descriptions of RDF Views and the like) from previously saved backup.
DB.DBA.RDF_TRIPLES_TO_RDF_XML_TEXT (inout triples any, in print_top_level any, inout ses any);
Serializes vector of triples into a session, in RDF/XML syntax.
DB.DBA.RDF_TRIPLES_TO_TTL (inout triples any, inout ses any);
Serializes vector of triples into a session, in TURTLE syntax.
DB.DBA.RDF_TTL2HASH (in strg any, in base varchar, in graph varchar);
Returns a dict of triples in 'long valmode'.
DB.DBA.SPARQL_EVAL (in query varchar, in dflt_graph varchar, in maxrows integer);
Local execution of SPARQL via SPARQL protocol, produces a result set of SQL values.
DB.DBA.SPARQL_EVAL_TO_ARRAY (in query varchar, in dflt_graph varchar, in maxrows integer);
Local execution of SPARQL via SPARQL protocol, produces a vector of vectors of SQL values.
DB.DBA.SPARQL_REXEC (in service varchar, in query varchar, in dflt_graph varchar, in named_graphs any, in req_hdr any, in maxrows integer, in bnode_dict any);
Remote execution of SPARQL via SPARQL protocol, produces a result set of SQL values.
DB.DBA.SPARQL_REXEC_TO_ARRAY (in service varchar, in query varchar, in dflt_graph varchar, in named_graphs any, in req_hdr any, in maxrows integer, in bnode_dict any);
Remote execution of SPARQL via SPARQL protocol, produces a vector of vectors of SQL value.
DB.DBA.SPARQL_REXEC_WITH_META (in service varchar, in query varchar, in dflt_graph varchar, in named_graphs any, in req_hdr any, in maxrows integer, in bnode_dict any, out metadata any, out resultset any);
Remote execution of SPARQL via SPARQL protocol. Fills in output parameters with metadata (like exec metadata) and a vector of vector s of 'long valmode' values.
DB.DBA.TTLP (in strg any, in base varchar, in graph varchar, in flags integer);
parses TTL (TURTLE or N3 resource) and places its triples into DB.DBA.RDF_QUAD.
DB.DBA.TTLP_MT (in strg any, in base varchar, [in graph varchar], [in flags integer], [in log_mode integer], [in threads integer]);
parses TTL (TURTLE or N3 resource) and places its triples into DB.DBA.RDF_QUAD on multiple threads.
DB.DBA.VACUUM (in table_name varchar (default %), in index_name varchar (default %));
Compact the database
dbg_obj_print (in arg1 any, ... );
print to the Virtuoso system console
dbg_printf (in format varchar, in arg1 any, ... , in argn any);
print formatted output onto the system console
get current catalog
decode_base64 (in str varchar);
base64-encode/decode a string
degrees (in x double precision);
trigonometric functions
delay (in n_seconds integer);
sleep for n seconds
convert any heterogeneous array or tree of arrays into a binary string and back
dictionary dict_duplicate (in dict dictionary);
Creates a copy of the given dictionary.
any dict_get (in dict dictionary, in key any, [in default_value any]);
Returns the dependent part that corresponds to the given key in the given dictionary.
vector dict_list_keys (inout dict dictionary, in destructive any);
Returns an array of all keys stored in the given dictionary.
dictionary dict_new ([in size integer]);
Creates a new dictionary to store key-value pairs.
int dict_put (inout dict dictionary, in key any, in value any);
Adds a key-value pair to a dictionary
int dict_remove (inout dict dictionary, inout key any);
Removes the given key and associated dependent value from the given dictionary.
vector dict_to_vector (inout dict dictionary, in destructive any);
Returns a get_keyword style vector of all items stored in the given dictionary.
disconnect_user (in username_patternstring);
Disconnect client connections of a given user
sequence distinct ( input sequence);
Removes double entities from the input sequence
node-set doc ( document_uri varchar);
Returns data from XML doc other than the main source document.
node-set document ( document_uri varchar, [base_uri varchar], [parser_mode integer], [content_encoding varchar], [content_language varchar], [dtd_validator_config varchar]);
Returns data from XML documents other than the main source document.
node-set document-literal ( document_text varchar, [cache_uri varchar], [parser_mode integer], [content_encoding varchar], [content_language varchar], [dtd_validator_config varchar]);
Parses given XML text and returns the resulting XML data.
varchar dsig_template_ext (in xdoc any, in tmpl varchar, in wss_ver any, in ns-n varchar, in elm-n varchar, in ... varchar);
Generates a Digital signature template based on a XML document.
dt_set_tz (in dt datetime, in tz integer);
modifies the timezone component of a datetime
dv_type_title ( internal_type integer);
returns the internal type name of the argument
array dvector ( elt1 , .... , elt-n );
return an array of either long, float or double
either (in cond any, in arg1 any, in arg2 any);
conditionally return one of specified parameters
encodedlang_handler_t * elh_get_handler (encoding_handler_t * encoding , language_handler_t * language );
get localization function handler
int elh_load_handler (encodedlang_handler_t * new_handler );
load encoding handler into system
boolean empty ( seq any);
Returns true if given argument is an empty sequence, false if it is any single value or nonempty sequence.
encode_base64 (in str varchar);
base64-encode/decode a string
End the current result set.
boolean ends-with ( strg string, suffix string);
Returns true if the first argument string ends with the second argument string, and otherwise returns false.
equ ( arg1 any, arg2 any);
comparison functions
boolean every ( varname string, test_set sequence, test_expn boolean);
Returns true if all items of given sequence matches given criterion.
sequence except ( set1 sequence, set2 sequence);
Returns a difference of two sets
exec (in str varchar, out state varchar, out message varchar, in params any, in maxrows integer, out metadata vector, out rows vector, out cursor_handle long);
dynamic execution of SQL returning state and result set
exec_close (in cursor_handle long);
Closes cursor created by exec()
exec_metadata (in str varchar, out state varchar, out message varchar, out metadata vector);
Compiles a SQL statement and returns the metadata
integer retcode exec_next (in cursor_handle long, out sql_state varchar, out sql_error varchar, out row_array vector);
Get next result from a result set
any exec_result (in res_values_array any);
Returns a result set row to the calling procedure context
exec_result_names (in res_names_array any);
Supplies column details for procedure result set output.
exec_score (in str varchar, out state varchar, out message varchar);
Compiles a SQL statement and returns the estimate time cost
exp (in x double precision);
calculate exponent
explain (in textvarchar, [in cursor_type integer]);
describe SQL statement compilation