Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 331a6bf34b79ebee0665f953f5e37620 > files > 225

pyrite-0.9.3-4mdk.i586.rpm

<HTML
><HEAD
><TITLE
>Stores</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.42"><LINK
REL="HOME"
TITLE="Pyrite Programmers Guide"
HREF="book1.html"><LINK
REL="UP"
TITLE="Reference"
HREF="p45.html"><LINK
REL="PREVIOUS"
TITLE="Databases"
HREF="c396.html"><LINK
REL="NEXT"
TITLE="Class: BaseStore"
HREF="x681.html"></HEAD
><BODY
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Pyrite Programmers Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c396.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x681.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="REF-STORES"
>Chapter 3. Stores</A
></H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
><A
HREF="c643.html#REF-STORES-STORE"
>Class: Store</A
></DT
><DT
><A
HREF="x681.html"
>Class: BaseStore</A
></DT
></DL
></DIV
><P
>    Databases can be located in many different places: on a connected
    handheld, in a local directory, or even on an SQL server.  Support
    for specific database access methods is provided by plug-ins in
    the <TT
CLASS="LITERAL"
>Store</TT
> collection.  The core code for all
    <TT
CLASS="LITERAL"
>Store</TT
> plug-ins is found in the <TT
CLASS="CLASSNAME"
>Pyrite.Store</TT
>
    module.
  </P
><P
>    <TT
CLASS="LITERAL"
>Store</TT
> plug-ins operate in a two-tiered fashion.  Each
    plug-in represents a general type of database storage, and can be
    used to generate objects representing a particular "live" instance
    of that storage.  For example, the <TT
CLASS="CLASSNAME"
>Directory</TT
> plug-in
    represents the general concept "databases stored in a local
    directory", and it generates store objects which can be used to
    access a specific, existing directory.  The base class for
    <TT
CLASS="LITERAL"
>Store</TT
> plug-ins is <TT
CLASS="CLASSNAME"
>Pyrite.Store.Store</TT
>; the
    base class for live store objects is
    <TT
CLASS="CLASSNAME"
>Pyrite.Store.BaseStore</TT
>.
  </P
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="REF-STORES-STORE"
>Class: Store</A
></H1
><P
>      The <TT
CLASS="CLASSNAME"
>Store</TT
> class is a subclass of
      <TT
CLASS="CLASSNAME"
>Pyrite.Plugin</TT
>, which is a subclass of
      <TT
CLASS="CLASSNAME"
>Sulfur.Plugin</TT
>.
    </P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="REF-STORES-STORE-CLASSATTRIBUTES"
>Class Attributes</A
></H2
><P
></P
><DL
><DT
><TT
CLASS="STRUCTFIELD"
><I
>store_class</I
></TT
> (<SPAN
CLASS="TYPE"
>class object</SPAN
>)</DT
><DD
><P
>The class from which to generate live store objects
	      by default.</P
></DD
></DL
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="REF-STORES-STORE-METHODS"
>Methods</A
></H2
><P
></P
><DL
><DT
><TT
CLASS="FUNCTION"
>__call__</TT
> (<TT
CLASS="PARAMETER"
><I
>*</I
></TT
>, <TT
CLASS="PARAMETER"
><I
>**</I
></TT
>)</DT
><DD
><P
>Create a live store object.  All parameters are
	      passed to that object's <TT
CLASS="FUNCTION"
>__init__</TT
>
	      method.</P
></DD
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c396.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x681.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Databases</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="p45.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Class: BaseStore</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>