Trees Indices Help
Trac
Package trac :: Package admin :: Package tests :: Module console :: Class InMemoryEnvironment

Class InMemoryEnvironment

source code

 object --+ 
 | 
 core.Component --+ 
 | 
 object --+ | 
 | | 
core.ComponentManager --+ 
 | 
 env.Environment --+
 |
 InMemoryEnvironment

A subclass of Environment that keeps its DB in memory.
Nested Classes

Inherited from core.Component : __metaclass__

Instance Methods
get_read_db(self)
Return a database connection for read purposes. source code
get_db_cnx(self)
Return a database connection from the connection pool (deprecated) source code
create(self, options=[])
Create the basic directory structure of the environment, initialize the database and populate the configuration file with default values. source code
verify(self)
Verify that the provided path points to a valid Trac environment directory. source code
setup_log(self)
Initialize the logging sub-system. source code
is_component_enabled(self, cls)
Implemented to only allow activation of components that are not disabled in the configuration. source code
setup_config(self)
Load the configuration file. source code

Inherited from env.Environment : __init__ , backup , component_activated , enable_component , get_htdocs_dir , get_known_users , get_log_dir , get_repository , get_system_info , get_systeminfo , get_templates_dir , get_version , needs_upgrade , shutdown , upgrade , with_transaction

Inherited from core.ComponentManager: __contains__, __getitem__, disable_component, is_enabled

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods

Inherited from core.Component : __new__ , implements

Class Variables
Properties

Inherited from env.Environment : abs_href , href , setup_participants , system_info_providers

Inherited from object: __class__

Method Details

get_read_db(self)

source code

Return a database connection for read purposes.

See trac.db.api.get_read_db for detailed documentation.

Overrides: env.Environment.get_read_db
(inherited documentation)

get_db_cnx(self)

source code

Return a database connection from the connection pool (deprecated)

Use with_transaction for obtaining a writable database connection and get_read_db for anything else.

Overrides: env.Environment.get_db_cnx
(inherited documentation)

create(self, options=[])

source code

Create the basic directory structure of the environment, initialize the database and populate the configuration file with default values.

If options contains ('inherit', 'file'), default values will not be loaded; they are expected to be provided by that file or other options.

Overrides: env.Environment.create
(inherited documentation)

verify(self)

source code
Verify that the provided path points to a valid Trac environment directory.
Overrides: env.Environment.verify
(inherited documentation)

setup_log(self)

source code
Initialize the logging sub-system.
Overrides: env.Environment.setup_log
(inherited documentation)

is_component_enabled(self, cls)

source code

Implemented to only allow activation of components that are not disabled in the configuration.

This is called by the ComponentManager base class when a component is about to be activated. If this method returns False, the component does not get activated. If it returns None, the component only gets activated if it is located in the plugins directory of the enironment.

Overrides: core.ComponentManager.is_component_enabled
(inherited documentation)

setup_config(self)

source code
Load the configuration file.
Overrides: env.Environment.setup_config
(inherited documentation)

Trees Indices Help
Trac

AltStyle によって変換されたページ (->オリジナル) /