From: dbs Date: Fri, 21 Dec 2007 04:29:19 +0000 (+0000) Subject: Add some documentation to this marvelous class X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=10a6d4ea3ecab4edf04db5802b39b9fb98579551;p=Evergreen.git Add some documentation to this marvelous class git-svn-id: svn://svn.open-ils.org/ILS/trunk@8261 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/python/oils/utils/csedit.py b/Open-ILS/src/python/oils/utils/csedit.py index 0270a342ee..a7ab7596ee 100644 --- a/Open-ILS/src/python/oils/utils/csedit.py +++ b/Open-ILS/src/python/oils/utils/csedit.py @@ -23,6 +23,33 @@ import re ACTIONS = ['create', 'retrieve', 'batch_retrieve', 'update', 'delete', 'search'] class CSEditor(object): + """ + Contains generated methods for accessing fieldmapper objects using the + following syntax: + + .__() + + * = CSEditor class instance + * = one of 'create', 'retrieve', 'batch_retrieve', 'update', + 'delete', or 'search' + * = the name of the schema that contains the table + *
= the name of the table + + Each generated object has accessor methods corresponding to the fieldmapper + name attributes for a given field. The following example demonstrates how to + instantiate the CSEditor and a given table object, and how to invoke an + accessor method on that table object: + + >>> import oils.utils.csedit + >>> import oils.utils.idl + >>> import osrf.system + >>> osrf.system.connect('/openils/conf/opensrf_core.xml', 'config.opensrf') + >>> oils.utils.idl.oilsParseIDL() + >>> oils.utils.csedit.oilsLoadCSEditor() + >>> editor = oils.utils.csedit.CSEditor() + >>> rec = editor.retrieve_biblio_record_entry(-1) + >>> print rec.tcn_value() + """ def __init__(self, **args): self.app = args.get('app', OILS_APP_CSTORE)