An Embeddable NoSQL Database Engine
|
|
|
List of Jx9 built-in functions & constants.

The
following page enumerates all the built-in Jx9 functions and constants.
As of this release, there is a total of 312 functions and
over 142 constants.
A
full API reference guide will be available shortly. Meanwhile, if you
need a full description of a particular Jx9 function such as expected
number of arguments, purpose, return value, side effect and so forth
you can post one or more questions in the UnQLite
forum or the UnQLite
users mailing list.
C/C++
functions can be added easily using the foreign
function mechanism. To get the full list of defined functions
from your Jx9 script, simply call get_defined_functions() which
return a JSON array holding all installed functions.
Database Storage & Retrieval
Functions.
JSON Arrays & Objects Processing functions.
Variable Handling functions.
is_bool
|
is_float
|
is_real
|
is_double
|
is_int
|
is_integer
|
is_long
|
is_string
|
is_null
|
is_numeric
|
is_scalar
|
is_array
|
is_object
|
is_resource
|
douleval |
floatval
|
intval
|
strval
|
empty
|
|
|
|
|
|
Special Virtual Machine functions.
json_encode
|
json_decode
|
func_num_args
|
func_get_arg
|
func_get_args
|
function_exists
|
is_callable
|
get_defined_functions
|
defined
|
get_defined_constants
|
print
|
die
|
exit
|
gettype
|
get_resource_type |
jx9_version
|
jx9_credits
|
jx9_info
|
jx9_copyright
|
getopt
|
utf8_encode
|
utf8_decode
|
include
|
import
|
Math functions.
abs
|
sqrt
|
exp
|
floor
|
cos
|
sin
|
acos
|
asin
|
cosh
|
sinh
|
ceil
|
tan
|
tanh
|
atan
|
atan2
|
log
|
log10
|
pow
|
pi
|
fmod
|
hypot
|
round
|
dechex
|
decoct
|
decbin
|
hexdec
|
bindec
|
octdec
|
base_convert
|
min
|
max
|
rand
|
rand_str
|
getrandmax
|
|
|
String Processing functions.
substr
|
substr_compare
|
substr_count
|
chunk_split
|
htmlspecialchars
|
htmlspecialchars_decode
|
get_html_translation_table
|
htmlentities
|
html_entity_decode
|
strlen
|
strcmp
|
strcoll
|
strncmp
|
strcasecmp
|
strncasecmp
|
implode
|
join
|
implode_recursive
|
join_recursive
|
explode
|
trim
|
rtrim
|
chop
|
ltrim
|
strtolower
|
mb_strtolower
|
strtoupper
|
mb_strtoupper
|
ord
|
chr
|
bin2hex
|
strstr
|
stristr
|
strchr
|
strpos
|
stripos
|
strrpos
|
strripos
|
strrchr
|
strrev
|
str_repeat
|
nl2br
|
sprintf
|
printf
|
vprintf
|
vsprintf
|
size_format
|
str_getcsv
|
strip_tags
|
str_split
|
strspn
|
strcspn
|
strpbrk
|
soundex
|
wordwrap
|
strtok
|
str_pad
|
str_replace
|
str_ireplace
|
strtr
|
parse_ini_string
|
ctype_alnum
|
ctype_alpha
|
ctype_cntrl
|
ctype_digit
|
ctype_xdigit
|
ctype_graph
|
ctype_print
|
ctype_punct
|
ctype_space
|
ctype_lower
|
ctype_upper |
Date/Time functions.
time
|
microtime
|
getdate
|
gettimeofday
|
date
|
strftime
|
idate
|
gmdate
|
localtime
|
mktime
|
gmmktime
|
|
URI Handling Functions.
convert_uuencode
|
convert_uudecode
|
urlencode
|
urldecode
|
rawurlencode
|
rawurldecode
|
idate
|
parse_url |
|
|
|
|
Hashing Functions
md5 (disabled)
|
sha1 (disabled) |
crc32 (disabled) |
base64_encode |
base64_decode |
md5_file (disabled) |
sha1_file (disabled) |
|
|
|
|
|
System (OS) Functions.
These functions are wrapper
around the underlying Virtual
File System VFS.
chdir
|
chroot
|
getcwd
|
rmdir
|
is_dir |
mkdir
|
rename
|
realpath
|
sleep
|
usleep
|
unlink
|
delete
|
chmod
|
chown
|
chgrp
|
disk_free_space
|
disk_total_space
|
file_exists
|
filesize
|
fileatime
|
filemtime
|
filectime
|
is_file
|
is_link
|
is_readable
|
is_writable
|
is_executable
|
filetype
|
stat
|
lstat
|
getenv
|
setenv
|
putenv
|
touch
|
link
|
symlink
|
umask
|
sys_get_temp_dir
|
get_current_user
|
getpid
|
getuid
|
getgid
|
uname
|
dirname
|
basename
|
pathinfo
|
strglob
|
fnmatch
|
tmpfile
|
scandir
|
glob
|
|
|
|
IO Stream Functions
These functions are wrapper
around the underlying IO Stream
Device.
ftruncate
|
fseek
|
ftell
|
rewind
|
fflush
|
feof |
fgetc
|
fgets
|
fread
|
fgetcsv
|
fgetss
|
readdir
|
rewinddir
|
closedir
|
opendir
|
readfile
|
file_get_contents
|
file_put_contents
|
file
|
copy
|
fstat
|
fwrite
|
fputs
|
flock
|
fclose
|
fopen
|
fpassthru
|
fputcsv
|
fprintf
|
parse_ini_file
|
vfprintf
|
|
|
|
|
|
ZIP Processing
zip_open
|
zip_close
|
zip_read
|
zip_entry_open
|
zip_entry_close
|
zip_entry_name
|
zip_entry_filesize
|
zip_entry_compressedsize
|
zip_entry_read
|
zip_entry_reset_cursor
|
zip_entry_compressionmethod
|
|
Table of builtin constants.
Host
application constants can be added easily using the foreign
constant mechanism. To get the full list of defined constants
from your Jx9 script, simply call get_defined_constants() which
return a JSON array holding all installed constants.
JX9_VERSION
|
JX9_ENGINE
|
__JX9__
|
JX9_OS
|
__OS__
|
JX9_INT_MAX
|
JX9_EOL
|
MAXINT
|
JX9_INT_SIZE
|
PATH_SEPARATOR
|
DIRECTORY_SEPARATOR
|
DIR_SEP
|
__TIME__
|
__DATE__
|
__FILE__
|
__DIR__
|
COUNT_NORMAL
|
COUNT_RECURSIVE
|
SORT_ASC
|
SORT_DESC
|
SORT_REGULAR
|
SORT_NUMERIC
|
SORT_STRING
|
JX9_URL_SCHEME
|
JX9_URL_HOST
|
JX9_URL_PORT
|
JX9_URL_USER
|
JX9_URL_PASS
|
JX9_URL_PATH
|
JX9_URL_QUERY
|
JX9_URL_FRAGMENT
|
JX9_QUERY_RFC1738
|
JX9_QUERY_RFC3986
|
SEEK_SET
|
SEEK_CUR
|
SEEK_END
|
LOCK_EX
|
LOCK_SH
|
LOCK_NB
|
LOCK_UN
|
STDIN
|
stdin
|
STDOUT
|
stdout
|
STDERR
|
stderr
|
SCANDIR_SORT_ASC
|
SCANDIR_SORT_DESC
|
SCANDIR_SORT_NONE
|
GLOB_MARK
|
GLOB_NOSORT
|
GLOB_NOCHECK
|
GLOB_NOESCAPE
|
GLOB_BRACE
|
GLOB_ONLYDIR
|
GLOB_ERR
|
FILE_USE_INCL_PATH
|
FILE_IGN_NL
|
FILE_SKIP_EL
|
FILE_APPEND
|
and many more...
|
|
|
|
|
|