\hypertarget{qore_intro_qore_introduction}{}\doxysection{Introduction to Qore}\label{qore_intro_qore_introduction} The Qore programming language is a powerful, thread-\/capable, embeddable weakly-\/typed language with optional strong typing and procedural and object-\/oriented features designed for anything from quick scripting to complex multithreaded, network-\/aware application development to embedded application scripting. Qore was initially designed to facilitate the rapid implementation of sophisticated interfaces in embedded code in an enterprise environment, and has since grown into a general-\/purpose language as well. Qore exports a C++ API to allow programs or libraries to embed Qore code; this manual documents Qore\textquotesingle{}s user-\/level features, for more information about Qore\textquotesingle{}s C++ API, see the \href{http://www.qore.org}{\texttt{ Qore home page}}. Flexible \mbox{\hyperlink{character_encoding}{character encoding support}} is also built-\/in to Qore strings, and automatic character encoding conversions are supported, enabling correct behavior when working in an environment with mixed character encoding requirements (see \mbox{\hyperlink{character_encoding}{Strings and Character Encoding}}). Qore includes the following design points\+: {\bfseries{Support for Embedded Logic}}~\newline Qore was designed to support embedding logic in applications; this also applies to applications written in Qore as well as applications using the Qore library\textquotesingle{}s public C++ API. By using the \mbox{\hyperlink{class_qore_1_1_program}{Program}} class, discrete objects can be created and destroyed at will containing embedded code to extend or modify the behavior of your application in user-\/defined ways. The \mbox{\hyperlink{class_qore_1_1_program}{Program}} class allows the capabilities of embedded code to be arbitrarily restricted as well. {\bfseries{Thread Safety and SMP Scalability}}~\newline All elements of Qore are thread-\/safe, and the language in general has been designed with SMP scalability in mind. The internal design and implementation of Qore favors multithreaded performance over single-\/threaded performance, so multithreaded Qore programs can count on an efficient and stable execution platform, and do not have to limit themselves to a subset of Qore\textquotesingle{}s functionality (see \mbox{\hyperlink{threading}{Threading}}). Additionally, Qore includes optimizations designed to reduce the number of SMP cache invalidations that provide a substantial performance boost on SMP machines. Qore supports deadlock detection in complex locking scenarios and will throw an exception rather than allow an operation to be performed that would cause a deadlock. Furthermore, Qore\textquotesingle{}s threading primitives detect threading errors and throw exceptions in these cases as well. {\bfseries{Database Integration and DBI Layer}}~\newline Retrieving, comparing, and manipulating data in a consistent manner from heterogenous database types is made possible by Qore\textquotesingle{}s built-\/in database integration. Qore was designed with a database independent interfacing (DBI) layer, providing a standard interface for Qore programs to access any database supported by a Qore DBI driver (see the \mbox{\hyperlink{class_qore_1_1_s_q_l_1_1_datasource}{Datasource}} class). Qore now supports a very high level API in \href{../../modules/SqlUtil/html/index.html}{\texttt{ Sql\+Util}}, which provides facilities for automatic schema management and programmatic SQL generation as well as data synchronization between heterogenous database types and more. {\bfseries{Function and Class Library}}~\newline Qore\textquotesingle{}s basic functionality covers areas such as\+: POSIX-\/compliant command-\/line parsing (ex\+: \mbox{\hyperlink{class_qore_1_1_get_opt}{Get\+Opt}} class), strong encryption and digest calculation, thread synchronization (ex\+: \mbox{\hyperlink{class_qore_1_1_thread_1_1_queue}{Queue}} class, \mbox{\hyperlink{class_qore_1_1_thread_1_1_mutex}{Mutex}} class, \mbox{\hyperlink{class_qore_1_1_thread_1_1_condition}{Condition}} class, etc), working with files (\mbox{\hyperlink{class_qore_1_1_file}{File}} class), socket, HTTP, and higher-\/level protocol communication (\mbox{\hyperlink{class_qore_1_1_socket}{Socket}}, \mbox{\hyperlink{class_qore_1_1_h_t_t_p_client}{HTTPClient}}, \mbox{\hyperlink{class_qore_1_1_ftp_client}{Ftp\+Client}} classes, optionally with TLS/\+SSL encryption), support for dynamic embedded application logic (\mbox{\hyperlink{class_qore_1_1_program}{Program}} class). Additionally, Qore\textquotesingle{}s functionality is extended with \mbox{\hyperlink{qore_modules}{modules}} delivered separately from the Qore library (see \mbox{\hyperlink{qore_modules}{Module Description}} or \href{http://www.qore.org}{\texttt{ Qore\textquotesingle{}s home page}} for more information. {\bfseries{Familiar Syntax}}~\newline Qore syntax is similar to other programming languages, allowing new programmers to rapidly come up to speed in Qore. Qore borrows features from languages such as\+: C++ (ex\+: \mbox{\hyperlink{qore_classes_inheritance}{multiple inheritance}}, \mbox{\hyperlink{exception_handling}{exception handling}}, \mbox{\hyperlink{qore_classes_static_methods}{static methods}}), Java (ex\+: the synchronized keyword, the \mbox{\hyperlink{operators_instanceof}{instanceof operator}}, \mbox{\hyperlink{container_data_types_object}{object}} and \mbox{\hyperlink{qore_classes}{class}} implementation), \href{http://www.perl.org}{\texttt{ Perl}} (ex\+: the \mbox{\hyperlink{statements_foreach}{foreach statement}}, \mbox{\hyperlink{operators_splice}{splice}}, \mbox{\hyperlink{operators_push}{push}}, \mbox{\hyperlink{operators_pop}{pop}}, \mbox{\hyperlink{operators_chomp}{chomp}}, \mbox{\hyperlink{operators_trim}{trim}} operators, perl5-\/compatible \mbox{\hyperlink{qore_regex}{regular expressions}}, and more), the D Programming Language (the \mbox{\hyperlink{statements_on_exit}{on\+\_\+exit}}, \mbox{\hyperlink{statements_on_success}{on\+\_\+success}}, and \mbox{\hyperlink{statements_on_error}{on\+\_\+error}} statements provide exception-\/aware functionality similar to D\textquotesingle{}s {\ttfamily scope(exit)}, {\ttfamily scope(failure)}, allowing exception-\/aware cleanup code to be placed next to the code requiring cleanup), Python (\mbox{\hyperlink{group__list__functions_gaad3b9056f1b0dfef032d130c7500f517}{range()}}, \mbox{\hyperlink{group__range__functions_gad5b4d3ad3f6c36d2e714bc6ed757a507}{xrange()}}, and the \mbox{\hyperlink{class_qore_1_1_range_iterator}{Range\+Iterator}} class), and others, also with many features unique to Qore. Furthermore, Qore supports \mbox{\hyperlink{expressions_closure}{closures}} (including binding local variables in the closure in a way that is safe to use even in multithreaded contexts) and features for advanced list processing (\mbox{\hyperlink{operators_map}{map}}, \mbox{\hyperlink{operators_foldl}{foldl}}, \mbox{\hyperlink{operators_foldr}{foldr}}, and \mbox{\hyperlink{operators_select}{select}}). Qore\textquotesingle{}s \mbox{\hyperlink{operators}{operators}} are designed to produce the expected results for the programmer even when data types are mixed, a feature meant to further flatten the learning curve for new programmers. {\bfseries{Simple Resource Management}}~\newline Qore\textquotesingle{}s \mbox{\hyperlink{container_data_types_garbage_collection}{garbage collection}} approach is unique and allows Qore to support the \href{http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization}{\texttt{ RAII idiom}} for resource management with deterministic collection and destruction of objects even when objects participate in recursive directed graphs; see \mbox{\hyperlink{container_data_types_garbage_collection}{Garbage Collection and Resource Management}} for more information. Additionally, every effort is made to find and fix bugs in Qore before every release; for example \href{http://www.valgrind.org}{\texttt{ valgrind}} is used on Linux and OSX and dbx on Solaris to check for memory leaks and memory errors. Particular attention is paid to thread-\/safety of all Qore components as well; Qore aims to be a stable platform for enterprise development supporting both quick script-\/based solutions and as an encapsulating language for embedding (and protecting) code in a server application. \begin{DoxyNote}{Note} Qore is moving toward establishing \mbox{\hyperlink{parse_directives_new-style}{\%new-\/style}} as the default syntax; all examples given in the Qore documentation are given assuming \mbox{\hyperlink{parse_directives_new-style}{\%new-\/style}}. \end{DoxyNote} "entry">getElementType()SqlUtil::SqlUtilDbSpecificDataTypevirtual getField(string field_name)DataProvider::AbstractDataProviderType getFieldInfo()DataProvider::AbstractDataProviderType getFields()SqlUtil::SqlUtilDbSpecificDataTypevirtual getFieldType(string field_name)DataProvider::AbstractDataProviderType getInfo()DataProvider::AbstractDataProviderType getInputInfo()DataProvider::AbstractDataProviderType getName()SqlUtil::SqlUtilDbSpecificDataTypevirtual getOptions()DataProvider::AbstractDataProviderType getOptionValue(string opt)DataProvider::AbstractDataProviderType getOrNothingType()DataProvider::AbstractDataProviderType getReturnTypeHash()SqlUtil::SqlUtilDbSpecificDataTypevirtual getSoftType()DataProvider::AbstractDataProviderType getSupportedOptions()DataProvider::AbstractDataProviderType getTag(string tag)DataProvider::AbstractDataProviderType getTags()DataProvider::AbstractDataProviderType getValueType()SqlUtil::SqlUtilDbSpecificDataTypevirtual hasType()DataProvider::AbstractDataProviderType isAssignableFrom(AbstractDataProviderType t)DataProvider::AbstractDataProviderType isAssignableFrom(Type t)DataProvider::AbstractDataProviderType isList()DataProvider::AbstractDataProviderType isMandatory()DataProvider::AbstractDataProviderType isOrNothingType()DataProvider::AbstractDataProviderType nameSqlUtil::SqlUtilDbSpecificDataTypeprotected nullableSqlUtil::SqlUtilDbSpecificDataTypeprotected optionsDataProvider::AbstractDataProviderTypeprotected setOption(string opt, auto value)DataProvider::AbstractDataProviderType setOptionIntern(string opt, auto value)DataProvider::AbstractDataProviderTypeprotected setOptions(hash< auto > options)DataProvider::AbstractDataProviderType tagsDataProvider::AbstractDataProviderTypeprotected