either built-in function description
string_output built-in function description
sprintf_inverseX built-in function description
string_output_string built-in function description
split_and_decode built-in function description
abs built-in function description
ascii built-in function description
atof built-in function description
atoi built-in function description
bit_and built-in function description
bit_or built-in function description
bit_not built-in function description
bit_shift built-in function description
bit_xor built-in function description
blob_to_string built-in function description
blob_to_string_output built-in function description
ceiling built-in function description
chr built-in function description
concat built-in function description
concatenate built-in function description
contains built-in function description
curdate built-in function description
dateadd built-in function description
datediff built-in function description
datestring built-in function description
datestring_gmt built-in function description
dayname built-in function description
dayofmonth built-in function description
dayofweek built-in function description
dayofyear built-in function description
dt_set_tz built-in function description
equ, gt, gte, lt, lte, neq built-in functions description
exp built-in function description
floor built-in function description
get_timestamp built-in function description
getdate built-in function description
st_point built-in function description
st_x built-in function description
st_y built-in function description
st_distance built-in function description
st_astext built-in function description
st_geomfromtext built-in function description
st_intersects built-in function description
st_contains built-in function description
st_within built-in function description
isgeometry built-in function description
geo_insert built-in function description
geo_delete built-in function description
hour built-in function description
initcap built-in function description
isarray built-in function description
isblob built-in function description
isbinary built-in function description
isdouble built-in function description
isentity built-in function description
isfloat built-in function description
isinteger built-in function description
isnull built-in function description
isnumeric built-in function description
isfinitenumeric built-in function description
isstring built-in function description
iszero built-in function description
__min built-in function description
__max built-in function description
__max_notnull built-in function description
__min_notnull built-in function description
jvm_ref_import built-in function description
lcase built-in function description
left built-in function description
length built-in function description
locate built-in function description
log built-in function description
log10 built-in function description
lower built-in function description
ltrim built-in function description
make_string built-in function description
minute built-in function description
mod built-in function description
month built-in function description
monthname built-in function description
msec_time built-in function description
now built-in function description
position built-in function description
power built-in function description
quarter built-in function description
randomize built-in function description
regexp_match built-in function description
regexp_parse built-in function description
regexp_substr built-in function description
regexp_replace built-in function description
regexp_instr built-in function description
regexp_like built-in function description
repeat built-in function description
replace built-in function description
right built-in function description
rnd built-in function description
rtrim built-in function description
search_excerpt built-in function description
second built-in function description
serialize built-in function description
sign built-in function description
space built-in function description
sprintf built-in function description
sprintf_iri built-in function description
sprintf_iri_or_null built-in function description
sprintf_or_null built-in function description
sqrt built-in function description
strcasestr built-in function description
strchr built-in function description
stringdate built-in function description
stringtime built-in function description
string_output_flush built-in function description
string_output_gz_compress built-in function description
string_to_file built-in function description
strrchr built-in function description
strstr built-in function description
subseq built-in function description
substring built-in function description
strcontains built-in function description
starts_with built-in function description
ends_with built-in function description
tmp_file_name built-in function description
timezone built-in function description
acos, asin, atan, atan2, cos, cot, degrees, pi, radians, sin, tan built-in functions description
trim built-in function description
ucase built-in function description
upper built-in function description
vector built-in function description
vector_concat built-in function description
week built-in function description
This is a document that uses Linked Data oriented content to describe OpenLink SPARQL Extensions BIF Ontology.
OpenLink SPARQL BIF Extensions Ontology Description Document
adjust_timezone built-in function description
curdatetime built-in function description
curdatetimeoffset built-in function description
current_timestamp built-in function description
curutcdatetime built-in function description
forget_timezone built-in function description
is_timezoneless built-in function description
rdf_now_impl built-in function description
sysutcdatetime built-in function description
This is a turtle document that uses Linked Data oriented content to describe an OpenLink SPARQL BIF Extensions ontology
OpenLink SPARQL BIF Extensions Ontology Description Document (Turtle)
ST_Affine built-in function description
ST_M built-in function description
ST_MMax built-in function description
ST_MMin built-in function description
ST_XMax built-in function description
ST_YMax built-in function description
ST_YMin built-in function description
ST_ZMax built-in function description
ST_ZMin built-in function description
ST_Zmflag built-in function description
earth_radius built-in function description
haversine_deg_km built-in function description
dist_from_point_to_line_segment built-in function description
st_linestring built-in function description
ST_Z built-in function description
ST_XMin built-in function description
st_may_intersect built-in function description
ST_SRID built-in function description
ST_SetSRID built-in function description
st_ewkt_read built-in function description
http_st_ewkt built-in function description
http_st_dxf_entity built-in function description
st_get_bounding_box built-in function description
GeometryType built-in function description
ST_NumGeometries built-in function description
ST_GeometryN built-in function description
ST_ExteriorRing built-in function description
ST_NumInteriorRings built-in function description
ST_InteriorRingN built-in function description
st_get_bounding_box_n built-in function description
ST_Translate built-in function description
ST_TransScale built-in function description
st_transform_by_custom_projection built-in function description
ST_Transform built-in function description
postgis_proj_version built-in function description
2015-06-09T11:00:00-05:00
Ontology that defines entity and relation types used to describe SPARQL BIF extensions.
Examples contains, str etc.
1.0.0
OpenLink SPARQL BIF Extensions Ontology
This is a turtle document that uses Linked Data oriented content to describe an OpenLink Identity & Certification Ontology
OpenLink SPARQL BIF Extensions Ontology Description Document (Turtle)
The function returns the maximum value among all values in all its arguments by ignoring NULLs entirely.
Usage: bif:__max_notnull.
OpenLink Software
__max_notnull
GeometryType function returns EWKT type name of a given shape.
SELECT ?s,
bif:GeometryType(?o)
FROM <http://example.com>
WHERE
{
?s ?p ?o
}
ORDER BY ASC(str(?s))
OpenLink Software
GeometryType
performs standard 2d affine transformation with matrix
select st_affine (st_ewkt_read ('POLYGON((1 3,2 4,1 5,0 4,1 3),
(1 3.5,1.5 4,1 4.5,0.5 4,1 3.5))'),
30, 3, 1, 0.3, 0.001, 0.002)
OpenLink Software
ST_Affine
Returns an external (the very first) ring of a polygon.
Usage: bif:ST_ExteriorRing.
OpenLink Software
ST_ExteriorRing
Given a 1-based index of a member of a MULTI or COLLECTION shape, returns the member
Usage: bif:ST_GeometryN.
OpenLink Software
ST_GeometryN
Given a 1-based index of an interior ring of a polygon, returns the ring. Wrong index is not reported as an error and NULL is returned.
Usage: bif:ST_InteriorRingN.
OpenLink Software
ST_InteriorRingN
Returns the M coordinate. M is for mileage or the like. M equal to 245.3 could be 245.3 km of road or 0.3 distance from buoy 245 to buoy 246 or similar.
Usage: bif:ST_M.
OpenLink Software
ST_M
Returns boundaries of a bounding box around a shape. Bounding boxes around arcs are calculated in assumption that no one arc is longer than a half of full circle.
SELECT ?s, bif:st_mmax(?o) as ?mmax
FROM <http://example.com>
WHERE { ?s ?p ?o }
OpenLink Software
ST_MMax
Returns boundaries of a bounding box around a shape. Bounding boxes around arcs are calculated in assumption that no one arc is longer than a half of full circle.
Usage: bif:ST_MMin. SPARQL
SELECT ?s, bif:st_mmin(?o) as ?mmin
FROM <http://example.com>
WHERE { ?s ?p ?o };
OpenLink Software
ST_MMin
Returns number of members of a MULTI or COLLECTION shape, 1 for other sorts of shapes.
SELECT ?s, bif:GeometryType(?o),
bif:ST_NumGeometries(?o)
FROM <http://example.com>
WHERE
{
?s ?p ?o
}
ORDER BY ASC(str(?s))
OpenLink Software
ST_NumGeometries
Returns number of interior rings of the given polygon, NULL if shape is not a polygon.
SELECT ?s bif:ST_NumInteriorRings (?o)
FROM <http://example.com/>
WHERE { ?s ?p ?o }
ORDER BY ASC(str(?s))
OpenLink Software
ST_NumInteriorRings
Returns the SRID of a geometry.
SELECT (bif:ST_SRID (?geo))
WHERE
{
?m geo:geometry ?geo .
}
LIMIT 10;
OpenLink Software
ST_SRID
The geometry given as argument is modified to have the specified SRID and the modified geometry is returned.
Usage: bif:ST_SetSRID.
OpenLink Software
ST_SetSRID
Returns a copy of a shape with all coordinates shifted by the provided dX, dY and then multiplied by Xfactor and Yfactor. Different values for Xfactor and Yfactor will result in distorted arcs.
SELECT ?s, bif:ST_TransScale(?o, 0.1, 0.2, 0.1, 0.1)
FROM <http://example.com>
WHERE
{
?s ?p ?o
}
ORDER BY ASC(str(?s))
OpenLink Software
ST_TransScale
Transforms the given shape from its current spatial reference system to one specified by dest_srid.
Usage: bif:ST_Transform.
OpenLink Software
ST_Transform
Returns a copy of a shape with all coordinates shifted by the provided dX, dY and dZ.
Usage: bif:ST_Translate.
OpenLink Software
ST_Translate
Returns boundaries of a bounding box around a shape. Bounding boxes around arcs are calculated in assumption that no one arc is longer than a half of full circle.
SELECT ?s,
bif:st_xmax(?o) as ?xmax
FROM <http://example.com>
WHERE { ?s ?p ?o }
OpenLink Software
ST_XMax
Returns boundaries of a bounding box around a shape. Bounding boxes around arcs are calculated in assumption that no one arc is longer than a half of full circle.
SELECT ?s,
bif:ST_XMin(?o) as ?xmin
FROM <http://example.com>
WHERE { ?s ?p ?o }
OpenLink Software
ST_XMin
Returns boundaries of a bounding box around a shape. Bounding boxes around arcs are calculated in assumption that no one arc is longer than a half of full circle
Usage: bif:ST_YMax.
OpenLink Software
ST_YMax
Returns boundaries of a bounding box around a shape. Bounding boxes around arcs are calculated in assumption that no one arc is longer than a half of full circle.
Usage: bif:ST_YMin.
OpenLink Software
ST_YMin
Retrieves the x coordinate of a geometry.
Usage: bif:ST_Z.
OpenLink Software
ST_Z
Returns boundaries of a bounding box around a shape. Bounding boxes around arcs are calculated in assumption that no one arc is longer than a half of full circle.
Usage: bif:ST_ZMax.
OpenLink Software
ST_ZMax
Returns boundaries of a bounding box around a shape. Bounding boxes around arcs are calculated in ssumption that no one arc is longer than a half of full circle.
Usage: bif:ST_ZMin.
OpenLink Software
ST_ZMin
Returns bits indicating presence of Z and/or M coordinates. 0 means that the shape has only X and Y, 1 means that M is also in use (but not Z), 2 means Z but ont M, 3 is for both M and Z.
Usage: bif:ST_Zmflag.
OpenLink Software
ST_Zmflag
The function returns the maximum value among all values in all its arguments.
Usage: bif:__max.
OpenLink Software
__max
The function returns the minimum value among all values in all its arguments.
Usage: bif:__min.
OpenLink Software
__min
The function returns the minimum value among all values in all its arguments by ignoring NULLs entirely.
Usage: bif:__min_notnull.
OpenLink Software
__min_notnull
Returns the absolute value of its argument.
Usage: bif:abs.
OpenLink Software
abs
This function works with double precision floating point numbers. It converts its argument to an
IEEE 64-bit float and return a result of that type.
Usage: bif:acos
OpenLink Software
acos
The function returns its first argument with unchanged GMT value but new timezone offset, as it is specified by the second argument. If the first argument is timezoneless and third argument is missing or zero then error 22023 is signaled. If the first argument is timezoneless and third argument is nonzero then no error is signaled and the argument is handled like it is a GMT value.
Usage: bif:adjust_timezone.
OpenLink Software
adjust_timezone
ascii returns the ASCII value of the first character of a string. If an empty string is given, then zero is returned.
Usage: bif:ascii.
OpenLink Software
ascii
This function works with double precision floating point numbers. It converts its argument to an
IEEE 64-bit float and return a result of that type.
Usage: bif:asin
OpenLink Software
asin
This function works with double precision floating point numbers. It converts its argument to an
IEEE 64-bit float and return a result of that type.
Usage: bif:atan
OpenLink Software
atan
This function works with double precision floating point numbers. It converts its argument to an
IEEE 64-bit float and return a result of that type.
Usage: bif:atan2
OpenLink Software
atan2
Returns its argument as a single precision floating point. If the string cannot be parsed and converted to a valid float, a value 0.0 is returned.
Usage: bif:atof.
OpenLink Software
atof
Returns its argument as an integer. If the string cannot be parsed and converted to a valid integer, a value 0 is returned.
SELECT * FROM <http://example.com> WHERE { ?s ?p ?o . filter (bif:atoi (?o) > 130) };
OpenLink Software
atoi
Returns bitwise AND of two given integers. On 64-bit platforms, both arguments are intentionally truncated to 32 bits to maintain compatibility.
Usage: bif:bit_and.
OpenLink Software
bit_and
Returns bitwise NOT of a given integer. On 64-bit platforms the argument is intentionally truncated to 32 bits to maintain compatibility.
Usage: bif:bit_not.
OpenLink Software
bit_not
Returns bitwise OR of two given integers. On 64-bit platforms, both arguments are intentionally truncated to 32 bits to maintain compatibility.
Usage: bif:bit_or.
OpenLink Software
bit_or
Returns bitwise shift of two given integers. Depending on the arguments, the shift may be left or right. For right-shift, leftmost bits of the result are filled by the value of the 31-st bit. On 64-bit platforms, both arguments are intentionally truncated to 32 bits and the shift is restricted to 32 bits to maintain compatibility.
Usage: bif:bit_shift.
OpenLink Software
bit_shift
Returns bitwise XOR (exclusive "or") of two given integers. On 64-bit platforms, both arguments are intentionally truncated to 32 bits, to provide compartibility.
Usage: bif:bit_xor.
OpenLink Software
bit_xor
Although primarily used for converting blobs (long varbinary, long varchar) to string, blob_to_string may also be used to convert from wide string, persistent XML (XPER) and string_output streams. If the data being converted is longer than maximum length of a string, blob_to_string will signal an error.
Usage: bif:blob_to_string.
OpenLink Software
blob_to_string
Although primarily used for converting blobs (long varbinary, long varchar) to string output object, blob_to_string_output may also be used to convert from wide string, persistent XML (XPER) and string_output streams.
Usage: bif:blob_to_string_output.
OpenLink Software
blob_to_string_output
Calculates the smallest integer greater than or equal to x.
Usage: bif:ceiling.
OpenLink Software
ceiling
chr returns a new one character long string containing the character with character code given as parameter.
Usage: bif:chr.
OpenLink Software
chr
Function concat returns a new string, concatenated from a variable number of strings given as arguments.
NULL arguments are handled as empty strings. concat (str) returns a copy of str. concat () returns an empty string.
sparql select bif:concat(str(?s),(str(?o)) from <http://example.com> where {?s ?p ?o} limit 10
OpenLink Software
concat
Concatenate is an alias of concat.
select bif:concatenate(str(?s),(str(?o)) from <http://example.com> where {?s ?p ?o} limit 10
OpenLink Software
concatenate
A custom property (magic predicate) that applies string matching patterns to its object.
This property exposes a built-in SQL function as a SPARQL extension. This is a SQL predicate that specifies a condition on a column on which a free text index
exists. The expression is a string matching the grammar of a text search expression. This is computed for each
evaluation of the contains predicate and does not have to be a constant. For example a parameter or variable of
a containing score (e.g. procedure) is accepted. The score_limit is optional. If specified, it should be a numeric
expression determining the minimum score required to produce a hit. A virtual column named 'SCORE' is available in queries
involving a contains predicate. This can for example be returned in a result set or used for sorting. Note that the name
is in upper case and is case sensitive in all case modes.
SELECT * FROM <http://example.com> WHERE { ?s ?p ?o . ?o bif:contains "world" };
OpenLink Software
contains
This function works with double precision floating point numbers. It converts its argument to an
IEEE 64-bit float and return a result of that type.
Usage: bif:cos
OpenLink Software
cos
This function works with double precision floating point numbers. It converts its argument to an
IEEE 64-bit float and return a result of that type.
Usage: bif:cot
OpenLink Software
cot
Returns the current date or time as a date, time or datetime, respectively
Usage: bif:curdate.
OpenLink Software
curdate
Returns the current date or time as a date, time or datetime, respectively
Usage: bif:curdatetime.
OpenLink Software
curdatetime
The function returns current datetime, like now(), but fractional part of seconds can be adjusted by providing the number of "microseconds" as the argument. It is like curdatetime() but the returned datetime is in GMT timezone.
Usage: bif:curdatetimeoffset.
OpenLink Software
curdatetimeoffset
The function name refer to one function ( alias of now() ) that returns the timestamp of current transaction. It is the datetime of the beginning of current transaction with the fractional part of seconds replaced with serial number of a transaction within the second. If TimezonelessDatetimes=0 then the time has local timezone offset (as it was set at the time of last server start); otherwise it is timezoneless.
Usage: bif:current_timestamp.
OpenLink Software
current_timestamp
The function returns current datetime, like now(), but fractional part of seconds can be adjusted by providing the number of "microseconds" as the argument. The function is similar to curdatetime() but the returned datetime is in GMT timezone.
Usage: bif:curutcdatetime.
OpenLink Software
curutcdatetime
dateadd adds a positive or negative quantity of units to a date (in the internal date time format), and returns a new date so formed. The unit is specified as a string and can be one of the following: 'second', 'minute', 'hour', 'day', 'month', or 'year'. Use datestring to convert the result to a human-readable string.
OpenLink Software
dateadd
datediff subtracts date1 from date2 and returns the difference as an integer in the specified units.
SELECT ?wiki, ?dbp, bif:datediff('second', xsd:DateTime(?extracted) , now()) AS ?secondsAgo FROM <example.com> WHERE { ?wiki foaf:primaryTopic ?dbp . ?dbp dcterms:modified ?extracted . FILTER ( ?extracted > bif:dateadd('minute', -10, now())) } ORDER BY DESC (?extracted) LIMIT 30
OpenLink Software
datediff
datestring and datestring_gmt convert timestamps or datetimes from internal to external date-time representation. The external representation is a human-readable ASCII string of up to 30 characters. The external format is: YYYY-MM-DD hh:mm:ss uuuuuu where uuuuuu represents microseconds.
Usage: bif:datestring.
OpenLink Software
datestring
Converts the local datetime to GMT and returns its external representation as a string.
Usage: bif:datestring_gmt.
OpenLink Software
datestring_gmt
Decomposes a datetime to name of day. Can be used on timestamps, datetimes, dates and times.
Usage: bif:dayname.
OpenLink Software
dayname
Decomposes a datetime to day of month. Can be used on timestamps, datetimes, dates and times.
Usage: bif:dayofmonth.
OpenLink Software
dayofmonth
Decomposes a datetime to day of week. Can be used on timestamps, datetimes, dates and times.
Usage: bif:dayofweek.
OpenLink Software
dayofweek
Decomposes a datetime to day of year. Can be used on timestamps, datetimes, dates and times.
Usage: bif:dayofyear.
OpenLink Software
dayofyear
This function works with double precision floating point numbers. It converts its argument to an
IEEE 64-bit float and return a result of that type.
Usage: bif:degrees
OpenLink Software
degrees
Returns the distance between a point and a segment on a plane.
Usage: bif:dist_from_point_to_line_segment.
OpenLink Software
dist_from_point_to_line_segment
Modifies the timezone component of a datetime. The value remains equal for purposes of comparison but will look different when converted to a string. The timezone component is an offset from UTC in minutes. It can be retrieved with the timezone function.
Usage: bif:dt_set_tz.
OpenLink Software
dt_set_tz
Returns geom.mean of radius of Earth in kilometers, 6367.43568
Usage: bif:earth_radius.
OpenLink Software
earth_radius
Returns a copy of arg1 if cond is something else than integer 0 (zero). Otherwise, a copy of
arg2 is returned.
OpenLink Software
either
ends_with checks whether string X ends with Y, ignoring occurencies of Y in other places. Returns 1 or 0.
Usage: bif:ends_with.
OpenLink Software
ends_with
This function returns 1 if its first argument is equivalent to the second argument, respectively.
If the arguments are not of the same type, then an appropriate type coercion is done for them before comparison.
The function corresponds to SQL query operator = and is needed because the SQL syntax does
not allow these operators to be used on the left side of FROM keyword in a SELECT statement.
Usage: bif:equ .
OpenLink Software
equ
The function raises e to the power of x, it works with double precision floating point numbers, converts its argument to an IEEE 64-bit float and returns a result of that type.
Usage: bif:exp.
OpenLink Software
exp
floor calculates the largest integer smaller than or equal to x.
Usage: bif:floor.
OpenLink Software
floor
The function returns its first argument as a timezoned value. If the first argument is timezoneless then it is returned unchanged. If the first argument is timezoned and second argument is missing or zero then the result is timezoneless value that "looks like" local time notation. If the first argument is timezoned and second argument is nonzero then the value is first made GMT and then it becomes timezoneless.
Usage: bif:forget_timezone.
OpenLink Software
forget_timezone
Deletes a geometry from an R tree index. The tb must be a fully qualified name of an R tree table. This function is typically used from triggers on a geometry column. The function is transactional and makes a transaction log record of the action.
Usage: bif:geo_delete.
OpenLink Software
geo_delete
Inserts a geometry from an R tree index. The tb must be a fully qualified name of an R tree table. This function is typically used from triggers on a geometry column. The function is transactional and makes a transaction log record of the action.
Usage: bif:geo_insert.
OpenLink Software
geo_insert
get_timestamp is merely an alias for now and is provided for backward compatibility.
Usage: bif:get_timestamp.
OpenLink Software
get_timestamp
Returns the timestamp associated with current transaction. This is an alias of now().
Usage: bif:getdate.
OpenLink Software
getdate
This function returns 1 if its first argument greater
than to the second argument, respectively.
If the arguments are not of the same type, then an appropriate type coercion is done for them before comparison.
The function corresponds to SQL query operator > and is needed because the SQL syntax does
not allow these operators to be used on the left side of FROM keyword in a SELECT statement.
Usage: bif:gt.
OpenLink Software
gt
This function returns 1 if its first argument is greater than or equivalent
to the second argument, respectively. If the arguments are not of the same type, then an appropriate type coercion
is done for them before comparison. The function corresponds to SQL query operator >= and is needed because the SQL syntax does
not allow these operators to be used on the left side of FROM keyword in a SELECT statement.
Usage: bif:gte.
OpenLink Software
gte
The function calculates the approximate distance between two points, using haversine formula with an adjustment for case when points are ends of some diameter. Note that the order of arguments is latitude-longitude, not longitude-latitude.
Usage: bif:haversine_deg_km.
OpenLink Software
haversine_deg_km
Decomposes a datetime to hour. Can be used on timestamps, datetimes, dates and times.
Usage: bif:hour.
OpenLink Software
hour
This function writes a DXF (Data Exchange Format) representation of shape into the given output session.
Usage: bif:http_st_dxf_entity.
OpenLink Software
http_st_dxf_entity
Writes a EWKT representation of a shape to the given session, a fast replacement for http (st_astext (shape), ses).
Usage: bif:http_st_ewkt.
OpenLink Software
http_st_ewkt
initcap returns a copy of string str with the first character, if it is a lowercase letter, converted to the corresponding uppercase letter. Otherwise, an identical copy of the string is returned.
Usage: bif:initcap.
OpenLink Software
initcap
The function returns 1 for timezoneless arguments, zero for timezoned.
Usage: bif:is_timezoneless.
OpenLink Software
is_timezoneless
isarray is true if the argument is a valid argument to aref. This is the case for any string or vector.
Usage: bif:isarray.
OpenLink Software
isarray
Returns one if its argument is of type VARBINARY, zero otherwise.
Usage: bif:isbinary.
OpenLink Software
isbinary
Returns one if its argument as a handle to an object of the type LONG VARCHAR, zero otherwise.
isblob returns one if its argument as a handle to an object of the type LONG VARCHAR, zero otherwise.
Usage: bif:isblob.
OpenLink Software
isblob
Returns one if its argument is of type double precision float, zero otherwise.
isdouble returns one if its argument is of type double precision float, zero otherwise.
Usage: bif:isdouble.
OpenLink Software
isdouble
Returns true if its argument is an XML entity
Usage: bif:isentity.
OpenLink Software
isentity
Returns 1 if its argument is of numeric type and its value is plain valid numeric value, not a peculiarity like infinity or not-a-number.
isfinitenumeric returns 1 if its argument is of numeric type and its value is plain valid numeric value, not a peculiarity like infinity or not-a-number.
Usage: bif:isfinitenumeric.
OpenLink Software
isfinitenumeric
Returns one if its argument is of type single float, zero otherwise.
isfloat returns one if its argument is of type single float, zero otherwise.
Usage: bif:isfloat.
OpenLink Software
isfloat
Returns 1 if the argument is a geometry.
Usage: bif:isgeometry.
OpenLink Software
isgeometry
Returns one if its argument is of type integer, zero otherwise.
isinteger returns one if its argument is of type integer, zero otherwise.
Usage: bif:isinteger.
OpenLink Software
isinteger
Returns one if its argument is NULL, zero otherwise.
SELECT distinct (bif:subseq (?s, bif:strchr (?s, '#')))
WHERE {
graph ?g {
?s ?p `2+2` .
FILTER (! bif:isnull (bif:strchr (?s, '#') ) )
} };
OpenLink Software
isnull
isnumeric returns one if its argument is of type integer, single float or double precision floating point number, zero otherwise.
Returns one if its argument is of type integer, single float or double precision floating point number, zero otherwise.
SELECT round(?o)
WHERE
{
?s a ?c .
?s geo:geometry ?geo .
?s ?p ?o .
FILTER ( bif:isnumeric(?o) )
}
LIMIT 10
Usage: bif:isnumeric.
OpenLink Software
isnumeric
Returns one if its argument is of type VARCHAR, zero otherwise.
isstring returns one if its argument is of type VARCHAR, zero otherwise.
Usage: bif:isstring.
OpenLink Software
isstring
iszero returns one if its argument is an integer 0, a float 0.0 or a double 0.0 For any other arguments, of whatever type, it will return zero.
Returns one if its argument is an integer 0, a float 0.0 or a double 0.0 For any other arguments, of whatever type, it will return zero.
Usage: bif:iszero.
OpenLink Software
iszero
Creates XML description of Java class.
Usage: bif:jvm_ref_import.
OpenLink Software
jvm_ref_import
lcase returns a copy of string str with all the uppercase alphabetical characters converted to corresponding lowercase letters. This includes also the diacritic letters present in the ISO 8859/1 standard in range 192 - 222 decimal, excluding the character 223, German double-s which stays the same. lower is an alias for lcase.
Usage: bif:lcase.
OpenLink Software
lcase
left returns a subsequence of string str, taking count characters from the beginning of the string.
If count is zero an empty string '' is returned. If length of str is less than count then a copy of the whole str is returned.
Usage: bif:left.
OpenLink Software
left
Returns the length of its argument.
SELECT ?label
FROM <http://example.com>
WHERE
{
?s ?p ?label
FILTER (bif:length(str(?label))<= 256)
}
OpenLink Software
length
Returns the starting position of the first occurrence of string_exp1 within string_exp2. The search for the first occurrence of string_exp1 begins with the first character position in string_exp2 unless the optional argument, start, is specified. If start is specified, the search begins with the character position indicated by the value of start. The first character position in string_exp2 is indicated by the value 1. If string_exp1 is not found within string_exp2, the value 0 is returned.
OpenLink Software
locate
log calculates the natural logarithm of its argument and returns it as a IEEE 64-bit float.
Usage: bif:log.
OpenLink Software
log
log10 calculates the 10-based logarithm of its argument and returns it as a IEEE 64-bit float.
Usage: bif:log10.
OpenLink Software
log10
lcase returns a copy of string str with all the uppercase alphabetical characters converted to corresponding lowercase letters. This includes also the diacritic letters present in the ISO 8859/1 standard in range 192 - 222 decimal, excluding the character 223, German double-s which stays the same. lower is just an alias for lcase.
PREFIX sioc_t:<http://rdfs.org/sioc/types#>
SELECT DISTINCT ?s
FROM <http://example.com>
WHERE
{
?s sioc_t:Tag ?Tag. FILTER ( bif:lower(str(?Tag)) in ('analisi', 'autonomas',
'autonomia de gobierno',
'autonomia', 'autonomica',
'comun', 'comunidades', 'critico' ) )
}
OpenLink Software
lower
This function returns 1 if its first argument is less than to the second argument, respectively.
If the arguments are not of the same type, then an appropriate type coercion is done for them before comparison.
The function corresponds to SQL query operator < and is needed because the SQL syntax does
not allow these operators to be used on the left side of FROM keyword in a SELECT statement.
Usage: bif:lt.
OpenLink Software
lt
This function returns 1 if its first argument is less than or equivalent to the second argument, respectively.
If the arguments are not of the same type, then an appropriate type coercion is done for them before comparison.
The function corresponds to SQL query operator <= and is needed because the SQL syntax does
not allow these operators to be used on the left side of FROM keyword in a SELECT statement.
Usage: bif:lte.
OpenLink Software
lte
ltrim returns a copy of subsequence of string str with all the characters present in trimchars
trimmed off from the beginning. If the second argument is omitted, it is a space ' ' by default. rtrim is similar except
that it trims from the right. trim trims from both ends.
Usage: bif:ltrim.
OpenLink Software
ltrim
make_string returns a new string of length count, filled with binary zeros. If count is zero, an empty string '' is returned.
Returns a new string of length count, filled with binary zeros. If count is zero, an empty string '' is returned.
Usage: bif:make_string.
OpenLink Software
make_string
Decomposes a datetime to minute. Can be used on timestamps, datetimes, dates and times.
Usage: bif:minute.
OpenLink Software
minute
mod returns the modulus (i.e. remainder) of the division dividend/divisor. If the divisor is zero the SQL error 22012 "Division by zero" is generated.
Usage: bif:mod.
OpenLink Software
mod
Decomposes a datetime to month number, starting at 1 for January. Can be used on timestamps, datetimes, dates and times.
Usage: bif:month.
OpenLink Software
month
Monthname takes a datetime and returns a string containing name of the month represented by the datetime
Usage: bif:monthname.
OpenLink Software
monthname
Returns the number of milliseconds since system epoch. It is useful for benchmarking purposes, timing operations, etc.
Usage: bif:msec_time.
OpenLink Software
msec_time
This function returns 1 if its first argument is not equivalent to the second argument, respectively.
If the arguments are not of the same type, then an appropriate type coercion is done for them before comparison.
The function corresponds to SQL query operator <> and is needed because the SQL syntax does
not allow these operators to be used on the left side of FROM keyword in a SELECT statement.
Usage: bif:neq.
OpenLink Software
neq
Returns the timestamp associated with current transaction as a DATETIME. This value is guaranteed to differ from the timestamp of any other transaction.
sparql select ?offer from <http://example.com> where { ?offer a gr:Offering ; gr:validFrom ?validfrom ; gr:validThrough ?validto . FILTER(?validfrom <= bif:now() and ?validto >= bif:now()) . }
OpenLink Software
now
This function works with double precision floating point numbers. It converts its argument to an
IEEE 64-bit float and return a result of that type.
Usage: bif:pi
OpenLink Software
pi
Returns the one-based index for the first occurrence of element within an array or string, beginning from offset start_index and iterating with step. If the second argument is a string, the first argument must be a string with a single character. If the second argument is an array of any, then depending of type of it's elements same type is expected as the first argument.
select bif:position('b',(str(?o)) from <http://example.com> where {?s ?p ?o} limit 10
OpenLink Software
position
Returns the version of the v7proj4 plugin in use, as a string, for compatibility with PostGIS.
Usage: bif:postgis_proj_version.
OpenLink Software
postgis_proj_version
power raises x to the yth power and returns the value as a IEEE 64-bit float.
Usage: bif:power.
OpenLink Software
power
quarter takes a datetime and returns an integer containing a number representing the quarter of year of the datetime.
Usage: bif:quarter.
OpenLink Software
quarter
This function works with double precision floating point numbers. It converts its argument to an
IEEE 64-bit float and return a result of that type.
Usage: bif:radians
OpenLink Software
radians
The rnd function returns a random number between zero and n - 1, inclusive.
randomize initializes the random number generator. The random number generator is initialized after the clock at
first usage, so the produced sequences will be different each time unless specifically initialized.
Usage: bif:randomize.
OpenLink Software
randomize
This function returns the timestamp associated with current transaction as a DATETIME. The function name refer to one function ( alias of now() ) that returns the timestamp of current transaction. It is the datetime of the beginning of current transaction with the fractional part of seconds replaced with serial number of a transaction within the second. If TimezonelessDatetimes=0 then the time has local timezone offset (as it was set at the time of last server start); otherwise it is timezoneless.
Usage: bif:rdf_now_impl.
OpenLink Software
rdf_now_impl
This function looks for a pattern and returns the first position of the pattern. Optionally, you can indicate
the start_position you want to begin the search. The occurrence parameter defaults to 1 unless you indicate that you are looking for
a subsequent occurrence. The default value of the return_option is 0, which returns the starting position of the pattern; a value
of 1 returns the starting position of the next character following the match. This function returns the starting position of a
pattern, so it works much like the familiar INSTR function. The main difference between the two functions is that REGEXP_INSTR
lets you specify a pattern instead of a specific search string; thus providing greater versatility.
Usage: bif:regexp_instr.
OpenLink Software
regexp_instr
Allows a like comparison using regular-expression.
Usage: bif:regexp_like.
OpenLink Software
regexp_like
The regexp_match function returns a copy of substring of string str which matches the regular
expression pattern. Previous behavior of this function would cut the first characters of str until the end of regular
expression matched substring. In this way str could be passed to this function again to find the next occurrence of
substring that matches the regular expression. By default this behavior is not adopted by this function, but can be
enabled for pre 3.2 compatibility by supplying the optional third parameter. If either the pattern or str parameter
contain wide characters this function will operate in wide mode, first converting any narrow characters to wide and
returning a wide character response. Otherwise this function operates in narrow mode by default.
Usage: bif:regexp_match.
OpenLink Software
regexp_match
Returns substrings that match the regular expression in supplied string after an offset
Usage: bif:regexp_parse.
OpenLink Software
regexp_parse
This function replaces occurrence(s) of the matching pattern in the source_string with a specified
replace_string, allowing complex search-and-replace operations. The traditional REPLACE SQL function substitutes one string
with another. Assume your data has extraneous spaces in the text and you would like to replace them with a single space.
With the REPLACE function, you would need to list exactly how many spaces you want to replace. However, the number of
extra spaces may not be the same everywhere in the text.
Usage: bif:regexp_replace.
OpenLink Software
regexp_replace
This function will return the whole string value of the first substring in "str" that matches the regexp in "pattern" or a sub part of the first match. The regexp syntax allows subexpressions to be marked in the regular expression (using the braces syntax). An example of such type of expression will be: '(2[34]).*(2[35])' which means a regular expression having two subexpressions: '2[34]' and '2[35]'.
Usage: bif:regexp_substr.
OpenLink Software
regexp_substr
repeat returns a new string, composed of the string str repeated count times. If count is zero, an empty string '' is returned.
Usage: bif:repeat.
OpenLink Software
repeat
Replaces every occurrence of the second argument in the first argument with the third argument. The arguments can be narrow or wide strings.
CONSTRUCT
{
?s <http://www.w3.org/2002/07/owl#equivalentClass> `iri (bif:replace(?o,'http://schema.rdfs.org/', 'http://schema.org/'))`
}
FROM <http://www.openlinksw.com/schemas/rdfs>
WHERE
{
?s <http://www.w3.org/2002/07/owl#equivalentClass> ?o
};
OpenLink Software
replace
Returns the count rightmost characters of string str. If count is zero an empty string '' is returned.
If length of str is less than count then a copy of the whole str is returned.
Usage: bif:right.
OpenLink Software
right
The rnd function returns a random number between zero and n - 1, inclusive.
Randomize initializes the random number generator. The random number generator is initialized after
the clock at first usage, so the produced sequences will be different each time unless specifically initialized.
SELECT ?s ?p ?o
FROM <http://example.com>
WHERE
{
?s ?p ?o .
FILTER ( 1 > <bif:rnd> (10, ?s, ?p, ?o) )
}
OpenLink Software
rnd
Returns a copy of subsequence of string str with all the characters present in trimchars trimmed off
from the beginning. If the second argument is omitted, it is a space ' ' by default. rtrim is similar except that it trims
from the right. trim trims from both ends.
Usage: bif:rtrim.
OpenLink Software
rtrim
This function produces representative samples for use in displaying a query hit. There are two
modes: html mode and text mode. In html mode everything looks like html tags is ignored and searching of excerpt begins
from <body> tag. All found hit words highlighted by html_hit_tag. In text mode text is treated as plain text, html tag
detection is disabled and hit words is not highlighted.
SELECT ?s ?o ?an ( bif:search_excerpt ( bif:vector ( 'In', 'Your' ) , ?o ) )
WHERE
{
?s rdf:type mo:Record .
?s schema:creator ?a .
?a foaf:name ?an .
?s dc:title ?o .
FILTER ( bif:contains ( ?o, '"in your"' ) )
}
LIMIT 10;
OpenLink Software
search_excerpt
second takes a datetime and returns an integer containing a number representing the second of the datetime.
Usage: bif:second.
OpenLink Software
second
This function will convert any heterogeneous array or tree of arrays into a binary string and back. The format is platform independent.
Usage: bif:serialize.
OpenLink Software
serialize
sign returns either -1, 0 or 1 depending whether its numeric argument is negative, zero or positive.
Returns either -1, 0 or 1 depending whether its numeric argument is negative, zero or positive.
Usage: bif:sign.
OpenLink Software
sign
This function works with double precision floating point numbers. It converts its argument to an
IEEE 64-bit float and return a result of that type.
Usage: bif:sin
OpenLink Software
sin
space returns a new string, composed of count spaces. If count is zero, an empty string '' is returned.
Usage: bif:space.
OpenLink Software
space
Converts the escaped var=val pair inputs text to a corresponding vector of string elements. If the optional third argument is a string of less than three characters, then does only the decoding (but no splitting) and returns back a string.
SELECT bif:aref (bif:split_and_decode('http%3A%2F%2Fexample.org%2Ftest1%3Bhttp%3A%2F%2Fexample.org%2Ftest2',0), 0)
{ ?S ?P ?O }
LIMIT 1
OpenLink Software
split_and_decode
Returns a new string formed by "printing" a variable number of arguments arg_1 - arg_x according to the format string format, that is, exactly the same way as with the sprintf function of C language. However the sprintf function enforces some additional limitations over the sprintf C function.
PREFIX nrl:<http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#>
SELECT ( bif:exec(bif:sprintf("SPARQL CLEAR GRAPH<%s>", str(?mg))))
WHERE
{
?mg nrl:coreGraphMetadataFor ?g .
FILTER(?g in ( <http://example.com> )) .
FILTER ( !bif:exists((SELECT (1) WHERE { GRAPH ?g { ?s ?p ?o . } . })) ) .
}
OpenLink Software
sprintf
Gets a string to parse, a format string and an integer (0,1 or 2) that indicates error recovery method. If the first argument matches the format string then it returns vector of the pattern values.
define input:storage ""
select (bif:aref(bif:sprintf_inverse (str(?idx), bif:concat (str(rdf:_), "%d"), 0), 0)) ?qm
from virtrdf:
where { virtrdf:DefaultQuadStorage-UserMaps ?idx ?qm . ?qm a virtrdf:QuadMap }
OpenLink Software
sprintf_inverse
Similar to sprintf returns a new string formed by "printing" a variable number of arguments arg_1 - arg_x according to the format string format. The difference is that the returned string is marked as being IRI string so some applications and clients may distinguish between RDF reference string and RDF literal.
Usage: bif:sprintf_iri.
OpenLink Software
sprintf_iri
Similar to sprintf_iri and returns a new string formed by "printing" a variable number of arguments arg_1 - arg_x according to the format string format. The difference is that the function can return null if any of the arguments except the first one is null. The returned string is marked as being IRI string so some applications and clients may distinguish between RDF reference string and RDF literal.
Usage: bif:sprintf_iri_or_null.
OpenLink Software
sprintf_iri_or_null
Similar to sprintf and returns a new string formed by "printing" a variable number of arguments arg_1 - arg_x according to the format string format. The difference is that the function can return null if any of the arguments except the first one is null.
Usage: bif:sprintf_or_null.
OpenLink Software
sprintf_or_null
sqrt calculates the square root of its argument and returns it as a IEEE 64-bit float.
Usage: bif:sqrt.
OpenLink Software
sqrt
Returns the well known text (WKT) representation of the geometry.
Usage: bif:st_astext.
OpenLink Software
st_astext
Returns true if all points of a given geometry g2 are in another geometry g1. If prec is supplied, this is a tolerance for the matching in units of linear distance appropriate to the srid. Both geometries should have the same srid.
Usage: bif:st_contains.
OpenLink Software
st_contains
Returns the shortest distance between two points such that the first point is part of g1 and the second of g2. The srid of g1 and g2 must be the same. If the srid is 4326, the haversine function is used to compute a great circle distance in kilometers on Earth. Otherwise the distance is calculated as on a flat Euclidean plane.
OpenLink Software
st_distance
Parses the given text as a EWKT and returns the parsed shape.
Usage: bif:st_ewkt_read.
OpenLink Software
st_ewkt_read
Parses the string and returns the corresponding geometry. The string is to be in well known text representation (WKT).
Usage: bif:st_geomfromtext.
OpenLink Software
st_geomfromtext
Returns BOX2D that is a bounding box of a shape.
Usage: bif:st_get_bounding_box.
OpenLink Software
st_get_bounding_box
Given a 1-based index of a member of a MULTI or COLLECTION shape, returns the bounding box of a member. This is a fast equivalent of st_get_bounding_box_n(ST_GeometryN (shape,idx)).
Usage: bif:st_get_bounding_box_n.
OpenLink Software
st_get_bounding_box_n
Returns intersects between two geometries. If prec is supplied, this is a tolerance for the matching in units of linear distance appropriate to the srid. Both geometries should have the same srid. st_intersects is true if there is at least one point in common.
SELECT ?c COUNT (*)
WHERE
{
?m geo:geometry ?geo .
?m a ?c .
FILTER (bif:st_intersects (?geo, bif:st_point (0, 52), 100))
}
GROUP BY ?c
ORDER BY DESC 2;
OpenLink Software
st_intersects
Returns a linestring in default SRID, the coordinates of vertices are specified by arguments that are points, 2-, 3- or 4-item vectors of coordinates, linestrings, arcstrings or vectors of the above mentioned values. Repeating vertices are automatically removed, except the case of repeating vertices in the middle of a linestring/arcstring argument.
Usage: bif:st_linestring.
OpenLink Software
st_linestring
checks whether bounding boxes of two shapes intersect or some of its points are within the specified proximity. This is much faster than full st_intersects() check.
Usage: bif:st_may_intersect.
OpenLink Software
st_may_intersect
Returns a point geometry. The x coordinate corresponds to longitude.
SELECT ?c COUNT (*)
WHERE
{
?m geo:geometry ?geo .
?m a ?c .
FILTER (bif:st_intersects (?geo, bif:st_point (0, 52), 100))
}
GROUP BY ?c
ORDER BY DESC 2;
OpenLink Software
st_point
Performs a custom projection of shape, using the specified algorithm and algorithm-specific arguments.
Usage: bif:st_transform_by_custom_projection.
OpenLink Software
st_transform_by_custom_projection
Returns true if all points of g1 are in g2. If prec is supplied, this is a tolerance for the matching in units of linear distance appropriate to the srid. Both geometries should have the same srid.
Usage: bif:st_within.
OpenLink Software
st_within
Retrieves the x coordinate of a geometry.
Usage: bif:st_x.
OpenLink Software
st_x
Retrieves the y coordinate of a geometry.
Usage: bif:st_y.
OpenLink Software
st_y
Checks whether string X begins with Y, ignoring occurencies of Y in other places. Returns 1 or 0.
Usage: bif:starts_with.
OpenLink Software
starts_with
Performs a case-insensitive substring search, returning a zero-based index pointing to beginning of first occurrence of sub or NULL if not found.
Usage: bif:strcasestr.
OpenLink Software
strcasestr
Returns a zero-based index to the first occurrence of char. If char is not found NULL is returned. char can be given either as an integer ASCII value or a string, in which case the first character of that string is searched fo.
SELECT distinct (bif:subseq (?s, bif:strchr (?s, '#')))
WHERE {
graph ?g {
?s ?p `2+2` .
FILTER (! bif:isnull (bif:strchr (?s, '#') ) )
} };
OpenLink Software
strchr
Performs a substring search, returning 1 or 0.
Usage: bif:strcontains.
OpenLink Software
strcontains
A string output stream is a special object that may be used to buffer arbitrarily long streams
of data. They are useful for handling data that would not otherwise fit within normal varchar size limitations. The
HTTP output functions optionally take a string output stream handle as a parameter and then output to said stream
instead of the HTTP client. A string output stream can be assigned to a database column in insert or update, causing
the characters written to the stream to be assigned to the column as a narrow string. The function string_output_string can
be used to produce a varchar out of a string output stream. It may be called repeatedly to obtain several copies of
the data. http_rewrite can be used to flush a string output stream. If a string output stream is passed to the function
result the data stored in it is sent to the client. The string output object cannot be copied. It cannot therefore be
assigned between two variables or passed by value (as an IN parameter.) It can be passed by reference (OUT, INOUT parameter.)
Usage: bif:string_output.
OpenLink Software
string_output
Resets the state of the string output object. The string associated with the string output is dropped and is of 0 characters after this call.
Usage: bif:string_output_flush.
OpenLink Software
string_output_flush
Compresses its string_output argument using the gzip algorithm and writes the result to another string_output given as an argument. When successful, the number of bytes written to str_out_out is returned
Usage: bif:string_output_gz_compress.
OpenLink Software
string_output_gz_compress
This function is used to produce a string from contents of a string output stream. See string_output for more information about string output streams.
Usage: bif:string_output_string.
OpenLink Software
string_output_string
This function requires dba privileges. string_to_file writes a varchar value or string session to
a file. The path is relative to the server's working directory. The mode is an integer value interpreted as a position.
A mode of 0 writes the content starting at offset 0. A mode of -1 appends to the end of the file. The append option is
probably the most useful for producing application level logs, etc. The string argument can also be a string output object.
In this case the content is used as the string. If the mode is -2, the new content supersedes the old. This is different
from 0 in that the file will be truncated if the new content is shorter than the old. The DirsAllowed and DirsDenied lists
in Parameters section of the virtuoso configuration file (virtuoso.ini by default) are used to control disk access. An error
42000/FA024 is signalled if an attempt is made to write to a file in a directory to which disk access is not explicitly allowed.
Usage: bif:string_to_file.
OpenLink Software
string_to_file
stringdate converts dates and timestamps from text to the internal DATETIME type.
The external format is: YYYY.MM.DD hh:mm.ss uuuuuu where uuuuuu represents number of microseconds. If trailing parts are
omitted from the string given to stringdate, they are assumed to be zero. The three first parts are mandatory. Note that
use of cast (x as datetime) is preferred over this function.
Converts dates and timestamps from text to the internal DATETIME type. The external format
is: YYYY.MM.DD hh:mm.ss uuuuuu where uuuuuu represents number of microseconds. If trailing parts are omitted from
the string given to stringdate, they are assumed to be zero. The three first parts are mandatory. Note that use of
cast (x as datetime) is preferred over this function.
PREFIX dst: <http://linkedgeodata.org/vocabulary#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT (bif:year( bif:stringdate(?sdate)) AS ?syear) (bif:sum( bif:number(?dist)) AS ?distance)
FROM <http://example.com>
WHERE
{
?row dc:date ?sdate .
?row dst:distance ?dist
}
GROUP BY (bif:year(bif:stringdate(?sdate)))
ORDER BY ASC(bif:year(bif:stringdate(?sdate)));
PREFIX dst: <http://linkedgeodata.org/vocabulary#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
SELECT (bif:year( bif:stringdate(?sdate)) AS ?syear)
(bif:sum( bif:number(?dist)) AS ?distance)
FROM <http://example.com>
WHERE
{
?row dc:date ?sdate .
?row dst:distance ?dist
}
GROUP BY (bif:year(bif:stringdate(?sdate)))
ORDER BY ASC(bif:year(bif:stringdate(?sdate)))
OpenLink Software
stringdate
Converts the argument to a time.
Usage: bif:stringtime.
OpenLink Software
stringtime
Returns a zero-based index to the last occurrence of char in string. If char is not found NULL is returned. char can be given either as an integer ASCII value or a string, in which case the first character of that string is searched for in str.
Usage: bif:strrchr.
OpenLink Software
strrchr
Performs a substring search, returning a zero-based index pointing to beginning of first occurrence of sub or NULL if not found.
Usage: bif:strstr.
OpenLink Software
strstr
Returns a copy of subsequence of string or vector str using zero-based indices from (inclusive) and
to (exclusive) to delimit the substring or the vector extracted. If to is omitted or is NULL, then it equals by default to
the length of str, i.e. everything from from to the end of str is returned. If to and from are equal, an empty string ''
(empty vector) is returned. If from is greater than to or length of str an error is signalled. If str is NULL then NULL
is returned.
SELECT (xsd:date(bif:subseq(str(?a_dt), 0, 10))), count(*)
FROM <http://example.com>
WHERE
{
?s <http://purl.org/dc/elements/1.1/date> ?a_dt
}
GROUP BY (xsd:date(bif:subseq(str(?a_dt), 0, 10)));
OpenLink Software
subseq
Returns a substring of string str. The start index is 1 based. The substring is sublen characters long.
This function follows SQL 92.
Usage: bif:substring.
OpenLink Software
substring
The function returns current datetime, like now(), but fractional part of
seconds can be adjusted by providing the number of "microseconds" as the argument. The function is
similar to curdatetime() but the returned datetime is in GMT timezone.
Usage: bif:sysutcdatetime.
OpenLink Software
sysutcdatetime
This function works with double precision floating point numbers. It converts its argument to an
IEEE 64-bit float and return a result of that type.
Usage: bif:tan
OpenLink Software
tan
The function returns timezone offset of its first argument, as an integer value in minutes. If the
first argument is timezoneless and second argument is missing or zero then the returned value is NULL. If the first argument
is timezoneless and second argument is nonzero then the returned value is 0.
Usage: bif:timezone.
OpenLink Software
timezone
This function is used to obtain unique name of a file, which is located in temporary directory on
file system. The two optional parameters can be supplied: prefix of the file and extension for it. These will be prepended
and appended (dot MUST be omitted) to the unique string. The directory where this file is located depends of $TMPDIR or
%TMP% environment settings for UNIX's and Windows platforms respectively. If these environment settings are not available
or empty, the defaults will be used for the operation system. (in practice for most UNIX's it's /tmp or /var/tmp directory).
Note that this function do NOT open the file, it only give us a name.
Usage: bif:tmp_file_name.
OpenLink Software
tmp_file_name
Returns a copy of subsequence of string str with all the characters present in trimchars trimmed
off from the beginning. If the second argument is omitted, it is a space ' ' by default. rtrim is similar except that it
trims from the right. trim trims from both ends.
Usage: bif:trim.
OpenLink Software
trim
Returns a copy of string str with all the lowercase alphabetical characters converted to corresponding
uppercase letters. This includes also the diacritic letters present in the ISO 8859/1 standard in range 224 - 254 decimal,
excluding the character 255, y diaeresis, which is not converted to a German double-s. upper is just an alias for ucase.
Usage: bif:ucase.
OpenLink Software
ucase
Returns a copy of string str with all the lowercase alphabetical characters converted to corresponding
uppercase letters. This includes also the diacritic letters present in the ISO 8859/1 standard in range 224 - 254 decimal,
excluding the character 255, y diaeresis, which is not converted to a German double-s. upper is just an alias for ucase.
Usage: bif:upper.
OpenLink Software
upper
vector returns a new vector (one-dimensional array) constructed from the given arguments.
select bif:vector('1',(str(?o), '34') from <http://example.com> where {?s ?p ?o} limit 10
OpenLink Software
vector
vector_concat takes a variable number of vectors (heterogeneous arrays) and constructs a new vector containing copies of each (top level) element in the arguments.
Usage: bif:vector_concat.
OpenLink Software
vector_concat
week takes a datetime and returns an integer containing a number representing the week of year of the datetime.
Usage: bif:week.
OpenLink Software
week
lt built-in function description