Home | Trees | Indices | Help |
---|
|
object --+ | ??.instance --+ | _basic_resource_manager_.ResourceLocator --+ | DatabaseResourceLocator
The %DatabaseResourceLocator class is responsible for retreiving data from a Database so that that data can then be used to construct a Resource. Upon construction or in its parse_my_tag method, the %DatabaseResourceLocator needs to be given the name of the database-session resource that it will use to communicate with the database and a partially formatted SQL command (a SELECT statement) that will be used to query the database for the resource that it will be pulling from the database. This SQL command should have a single question mark ("?") for the variable that will be replaced by the locator_id that will be given to the %DatabaseResourceLocator when its locate_resource_stream method is invoked. In that method, the %DatabaseResourceLocator will ask the ResourceManager for the database session object and then bind the input "locator_id" to the previously provided SQL command, and finally will query the database with that statement. The resulting output is packaged in a string stream and returned to the code that called locate_resource_stream (e.g. the ResourceManager) and then can be used to construct a resource.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
Inherited from |
|
|||
Inherited from |
|
__init__( (object)arg1) -> None : C++ signature : void __init__(_object*) __init__( (object)arg1, (str)database_session_resource_tag, (str)sql_command) -> None : Constructor that takes in both the name of the database session resource as well as the SQL command C++ signature : void __init__(_object*,std::string,std::string) __init__( (object)arg1, (DatabaseResourceLocator)src) -> None : basic/resource_manager/locator/DatabaseResourceLocator.hh:69 C++ signature : void __init__(_object*,basic::resource_manager::locator::DatabaseResourceLocator)
|
locate_resource_stream( (DatabaseResourceLocator)arg1, (str)locator_tag) -> ResourceStream : Create a ResourceStream object from the given resource source, so that its stream can be passed to the ResourceLoader using the input "locator_tag" which is bound to the partially formed SQL select statement that was provided at construction or in parse_my_tag C++ signature : boost::shared_ptr<basic::resource_manager::ResourceStream> locate_resource_stream(basic::resource_manager::locator::DatabaseResourceLocator {lvalue},std::string) locate_resource_stream( (DatabaseResourceLocator)arg1, (str)locator_tag) -> ResourceStream : C++ signature : boost::shared_ptr<basic::resource_manager::ResourceStream> locate_resource_stream(DatabaseResourceLocator_exposer_callback {lvalue},std::string) |
locator_tag( (DatabaseResourceLocator)arg1) -> str : Return the name for this %ResourceLocator C++ signature : std::string locator_tag(basic::resource_manager::locator::DatabaseResourceLocator {lvalue}) locator_tag( (DatabaseResourceLocator)arg1) -> str : C++ signature : std::string locator_tag(DatabaseResourceLocator_exposer_callback {lvalue}) locator_tag( (DatabaseResourceLocator)arg1, (str)locator_tag) -> None : Set the name for this %ResourceLocator C++ signature : void locator_tag(basic::resource_manager::locator::DatabaseResourceLocator {lvalue},std::string) locator_tag( (DatabaseResourceLocator)arg1, (str)locator_tag) -> None : C++ signature : void locator_tag(DatabaseResourceLocator_exposer_callback {lvalue},std::string) |
parse_my_tag( (DatabaseResourceLocator)arg1, (Tag)tag) -> None : Initialize the %DatabaseResourceLoader from the input set of tags which should contain both the name of the database session resource that will be used to talk to the database, and the partially formed SQL select statement that will be used to query the database. C++ signature : void parse_my_tag(basic::resource_manager::locator::DatabaseResourceLocator {lvalue},boost::shared_ptr<utility::tag::Tag const>) parse_my_tag( (DatabaseResourceLocator)arg1, (Tag)tag) -> None : C++ signature : void parse_my_tag(DatabaseResourceLocator_exposer_callback {lvalue},boost::shared_ptr<utility::tag::Tag const>) |
show( (DatabaseResourceLocator)arg1, (OStream)out) -> None : Describe the %DatabaseResourceLocator instance to the given output stream C++ signature : void show(basic::resource_manager::locator::DatabaseResourceLocator {lvalue},std::ostream {lvalue}) show( (DatabaseResourceLocator)arg1, (OStream)out) -> None : C++ signature : void show(DatabaseResourceLocator_exposer_callback {lvalue},std::ostream {lvalue}) |
type( (DatabaseResourceLocator)arg1) -> str : Return the typename for this class: "DatabaseResourceLocator" C++ signature : std::string type(basic::resource_manager::locator::DatabaseResourceLocator {lvalue}) type( (DatabaseResourceLocator)arg1) -> str : C++ signature : std::string type(DatabaseResourceLocator_exposer_callback {lvalue}) |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sat Jun 6 00:11:02 2015 | http://epydoc.sourceforge.net |