Datasources
(datasources)
Overview
Datasources
in Servoy provide a structured way to interact with various types of data sources, such as database tables, in-memory tables, views, and stored procedures. These datasources
are accessible through the datasources
efficient development.
Datasources
include types like DBDataSource
, MemDataSource
, ViewDataSource
, SPDataSource
, and MenuDataSource
, each catering to a specific use case. For example, db
is used for server/table-based data sources, mem
for in-memory tables, and view
for view foundset data sources. Stored procedures are managed under the sp
property, with server-side configuration enabling their use. The menu
property handles menu-related datasources.
For details related to datasources, refer to the specific sections in the Servoy documentation:
Returned Types
SPDataSource,SPDataSourceServer,DBDataSource,MemDataSource,JSDataSource,JSConnectionDefinition,DBDataSourceServer,ViewDataSource,MenuDataSource,
Properties Summarized
Methods Summarized
Scope getter for a datasource node based on a JSFoundset/JSRecord/ViewFoundset/ViewRecord
Properties Detailed
db
Scope property for server/table based data sources.
Type DBDataSource
Sample
datasources.db.example_data.orders
mem
Scope property for in-memory data sources.
Type MemDataSource
Sample
datasources.mem['myds']
menu
Scope property for view foundset data sources.
Type MenuDataSource
Sample
datasources.view['myds']
sp
Scope property for stored procedures. This will list the stored procedures of server that have this property enabled (see server editor).
Type SPDataSource
Sample
datasources.sp.servername.mystoredproc();
view
Scope property for view foundset data sources.
Type ViewDataSource
Sample
datasources.view['myds']
Methods Detailed
get(datasource)
Scope getter for a datasource node based on a JSFoundset/JSRecord/ViewFoundset/ViewRecord
Parameters
Object datasource ;
Returns: JSDataSource a JSDataSource based on parameter
Sample
datasources.get(recordOrFoundset)
get(datasource)
Scope getter for a datasource node based on datasource string.
Parameters
String datasource ;
Returns: JSDataSource a JSDataSource based on parameter
Sample
datasources.get(datasource)
Last updated
Was this helpful?