Class ::xo::db::postgresql

::xo::db::postgresql[i] create ...

Defined in

Class Relations

  • class: ::xotcl::Class[i]
  • superclass: ::xo::db::SQL[i]
  • subclass: ::xo::db::DB-postgresql[i], ::xo::db::DBI-postgresql[i]

Methods (to be applied on instances)

  • date_trunc (scripted)

  • date_trunc_expression (scripted)

  • get_all_package_functions (scripted, public)

     <instance of xo::db::postgresql[i]> get_all_package_functions

    Load PostgreSQL package function argument metadata into the XOTcl database interface cache.

    Testcases:
    xotcl_core_tutorial_2
  • get_function_args (scripted)

  • has_hstore (scripted)

  • has_ltree (scripted)

  • map_datatype (scripted, public)

     <instance of xo::db::postgresql[i]> map_datatype type

    Map an OpenACS datatype to its PostgreSQL representation. Delegate unhandled types to the next method.

    Parameters:
    type (required)
    OpenACS datatype.

    Testcases:
    xotcl_core_tutorial_2
  • nextval (scripted, public)

     <instance of xo::db::postgresql[i]> nextval sequence

    Return the next value of a PostgreSQL sequence, resolving its name through the per-thread sequence cache.

    Parameters:
    sequence (required)
    Sequence name.

    Testcases:
    xotcl_core_tutorial_4, test_cr_items
  • select (scripted, public)

     <instance of xo::db::postgresql[i]> select -vars vars  -from from  \
        [ -where where ] [ -groupby groupby ] [ -limit limit ] \
        [ -offset offset ] [ -start start ] [ -orderby orderby ] \
        [ -map_function_names map_function_names ]

    Build a PostgreSQL SELECT statement from SQL fragments.

    Switches:
    -vars (required)
    Expressions to select.
    -from (required)
    FROM clause contents.
    -where (optional)
    Optional WHERE condition.
    -groupby (optional)
    Optional grouping expressions.
    -limit (optional)
    Optional row limit.
    -offset (optional)
    Optional row offset.
    -start (optional)
    Compatibility option unused by PostgreSQL.
    -orderby (optional)
    Optional ordering expressions.
    -map_function_names (optional, defaults to "false")
    Compatibility option unused by PostgreSQL.

    Testcases:
    xotcl_core_tutorial_2