zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

type_info.ex (1482B)


      1 defmodule Postgrex.TypeInfo do
      2   @moduledoc """
      3   The information about a type that is provided to the custom encoder/decoder
      4   functions. See http://www.postgresql.org/docs/9.4/static/catalog-pg-type.html
      5   for clarifications of the fields.
      6 
      7     * `oid` - The type's id;
      8     * `type` - The type name;
      9     * `send` - The name of the "send" function (the function postgres uses
     10       to convert the type to its binary format);
     11     * `receive` - The name of the "receive" function (the function postgres uses
     12       to convert the type from its binary format);
     13     * `output` - The name of the "output" function (the function postgres uses
     14       to convert the type to its text format);
     15     * `input` - The name of the "input" function (the function postgres uses
     16       to convert the type from its text format);
     17     * `array_elem` - If this is an array, the array elements' oid;
     18     * `base_type` - If this is a range type, the base type's oid;
     19     * `comp_elems` - If this is a composite type (record), the tuple
     20       elements' oid;
     21   """
     22 
     23   alias Postgrex.Types
     24 
     25   @type t :: %__MODULE__{
     26           oid: Types.oid(),
     27           type: String.t(),
     28           send: String.t(),
     29           receive: String.t(),
     30           output: String.t(),
     31           input: String.t(),
     32           array_elem: Types.oid(),
     33           base_type: Types.oid(),
     34           comp_elems: [Types.oid()]
     35         }
     36 
     37   defstruct [:oid, :type, :send, :receive, :output, :input, :array_elem, :base_type, :comp_elems]
     38 end