xo::db::Class instproc instantiate_objects (public)
<instance of xo::db::Class> instantiate_objects [ -dbn dbn ] \ [ -sql sql ] [ -full_statement_name full_statement_name ] \ [ -as_ordered_composite on|off ] [ -object_class object_class ] \ [ -named_objects on|off ] \ [ -object_named_after object_named_after ] \ [ -destroy_on_cleanup on|off ] [ -keep_existing_objects on|off ] \ [ -ignore_missing_package_ids on|off ] [ -initialize initialize ]
Defined in packages/xotcl-core/tcl/05-db-procs.tcl
Retrieve multiple objects from the database using the given SQL query and create XOTcl objects from the tuples.
- Switches:
- -dbn
(optional)- -sql
(optional)- The SQL query to retrieve tuples. Note that if the SQL query only returns a restricted set of attributes, the objects will be only partially instantiated.
- -full_statement_name
(optional)- -as_ordered_composite
(boolean) (defaults to"true"
) (optional)- return an ordered composite object preserving the order. If the flag is false, one has to use "info instances" to access the resulted objects.
- -object_class
(defaults to"::xotcl::Object"
) (optional)- specifies the XOTcl class, for which instances are created.
- -named_objects
(boolean) (defaults to"false"
) (optional)- If this flag is true, the value of the id_column is used for the name of the created objects (object will be named e.g. ::13738). Otherwise, objects are created with the XOTcl "new" method to avoid object name clashes.
- -object_named_after
(optional)- -destroy_on_cleanup
(boolean) (defaults to"true"
) (optional)- If this flag is true, the objects (and ordered composite) will be automatically destroyed on cleanup (typically after the request was processed).
- -keep_existing_objects
(boolean) (defaults to"false"
) (optional)- -ignore_missing_package_ids
(boolean) (defaults to"false"
) (optional)- -initialize
(defaults to"true"
) (optional)- can be used to avoid full initialization, when a large series of objects is loaded. Per default, these objects are initialized via initialize_loaded_object, when the are of type ::xo::db::Object
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- xowiki_test_cases