noalyss Version-9
Public Member Functions
Quant_Purchase_SQL Class Reference

ORM of the table public.quant_purchase. More...

+ Inheritance diagram for Quant_Purchase_SQL:
+ Collaboration diagram for Quant_Purchase_SQL:

Public Member Functions

 __construct (DatabaseCore $p_cn, $p_id=-1)
 
- Public Member Functions inherited from Table_Data_SQL
 __construct ($p_cn, $p_id=-1)
 
 build_query ()
 Build the SQL select statement for querying the object and returns it. More...
 
 column_update ($column_expr, $value)
 update the value of a column with an expression for $value for the current record More...
 
 count ($p_where="", $p_array=null)
 return the number of count in the table corresponding to the where condition More...
 
 delete ()
 
 exist ()
 Count the number of record with the id ,. More...
 
 get_all_to_array ($p_key_col, $p_cond="", $p_array=NULL)
 Get all the row and use the p_key_code are the key value of array. More...
 
 insert ()
 
 load ()
 Load the current row return false if not found. More...
 
 seek ($cond='', $p_array=null)
 retrieve array of object thanks a condition More...
 
 update ()
 
- Public Member Functions inherited from Data_SQL
 __construct (DatabaseCore $p_cn, $p_id=-1)
 
 __toString ()
 
 collect_objects ($cond='', $p_array=null)
 return an array of objects. More...
 
 count ($p_where="", $p_array=null)
 
 delete ()
 
 exist ()
 Count the number of record with the id ,. More...
 
 from_array ($p_array)
 Transform an array into object. More...
 
 get ($p_string)
 get the value thanks the colum name and not the alias (name). More...
 
 get_cn ()
 
 get_info ()
 
 get_name ()
 
 get_object ($p_ret, $idx)
 
 get_pk_value ()
 
 get_primary_key ()
 
 get_type ()
 
 getp ($p_string)
 set the value thanks the alias name instead of the colum name More...
 
 insert ()
 
 load ()
 Load the current row return false if not found. More...
 
 next ($ret, $i)
 get_seek return the next object, the return of the query must have all the column of the object More...
 
 save ()
 Insert or update : if the row already exists, update otherwise insert. More...
 
 seek ($cond='', $p_array=null)
 retrieve array of object thanks a condition More...
 
 set ($p_string, $p_value)
 set the value thanks the colum name and not the alias (name) More...
 
 set_cn ($cn)
 
 set_name ($name)
 
 set_pk_value ($p_value)
 
 set_primary_key ($primary_key)
 
 set_type ($type)
 
 setp ($p_string, $p_value)
 set the value thanks the alias name instead of the colum name More...
 
 to_array ($prefix="")
 Turn an object (row) into an array, and the key could be prefixed with $prefix. More...
 
 to_row ($p_array)
 turns a row fetched from the DB into a SQL object in updating all his attribute More...
 
 update ()
 
 verify ()
 

Additional Inherited Members

- Data Fields inherited from Data_SQL
 $cn
 
 $date_format
 Type of the data. More...
 
 $default
 defaullt date format More...
 
 $name
 Database connection. More...
 
 $primary_key
 Array of logical and real name. More...
 
 $table
 
 $type
 Column name of the primary key. More...
 

Detailed Description

ORM of the table public.quant_purchase.

Definition at line 37 of file quant_purchase_sql.class.php.

Constructor & Destructor Documentation

◆ __construct()

Quant_Purchase_SQL::__construct ( DatabaseCore  $p_cn,
  $p_id = -1 
)

Reimplemented from Data_SQL.

Definition at line 40 of file quant_purchase_sql.class.php.

41 {
42 $this->table = "public.quant_purchase";
43 $this->primary_key = "qp_id";
44 /*
45 * List of columns
46 */
47 $this->name = array(
48 "qp_id" => "qp_id"
49 , "qp_internal" => "qp_internal"
50 , "j_id" => "j_id"
51 , "qp_fiche" => "qp_fiche"
52 , "qp_quantite" => "qp_quantite"
53 , "qp_price" => "qp_price"
54 , "qp_vat" => "qp_vat"
55 , "qp_vat_code" => "qp_vat_code"
56 , "qp_nd_amount" => "qp_nd_amount"
57 , "qp_nd_tva" => "qp_nd_tva"
58 , "qp_nd_tva_recup" => "qp_nd_tva_recup"
59 , "qp_supplier" => "qp_supplier"
60 , "qp_valid" => "qp_valid"
61 , "qp_dep_priv" => "qp_dep_priv"
62 , "qp_vat_sided" => "qp_vat_sided"
63 , "qp_unit" => "qp_unit"
64 );
65 /*
66 * Type of columns
67 */
68 $this->type = array(
69 "qp_id" => "numeric"
70 , "qp_internal" => "text"
71 , "j_id" => "numeric"
72 , "qp_fiche" => "numeric"
73 , "qp_quantite" => "numeric"
74 , "qp_price" => "numeric"
75 , "qp_vat" => "numeric"
76 , "qp_vat_code" => "numeric"
77 , "qp_nd_amount" => "numeric"
78 , "qp_nd_tva" => "numeric"
79 , "qp_nd_tva_recup" => "numeric"
80 , "qp_supplier" => "numeric"
81 , "qp_valid" => "text"
82 , "qp_dep_priv" => "numeric"
83 , "qp_vat_sided" => "numeric"
84 , "qp_unit" => "numeric"
85 );
86
87
88 $this->default = array(
89 "qp_id" => "auto"
90 );
91
92 $this->date_format = "DD.MM.YYYY";
93 parent::__construct($p_cn, $p_id);
94 }
$from_poste name
$input_from type
Definition: balance.inc.php:65
$all table

References $p_id, name, table, and type.


The documentation for this class was generated from the following file: