forked from Wavyzz/dolibarr
Merge pull request #12013 from Ahuahuachi/develop
Translate french documentation
This commit is contained in:
@@ -29,21 +29,21 @@ interface Database
|
||||
* Format a SQL IF
|
||||
*
|
||||
* @param string $test Test string (example: 'cd.statut=0', 'field IS NULL')
|
||||
* @param string $resok resultat si test egal
|
||||
* @param string $resko resultat si test non egal
|
||||
* @param string $resok result if test is equal
|
||||
* @param string $resko result if test is not equal
|
||||
* @return string SQL string
|
||||
*/
|
||||
public function ifsql($test, $resok, $resko);
|
||||
public function ifsql($test, $resok, $resko);
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return datas as an array
|
||||
*
|
||||
* @param resource $resultset Resultset of request
|
||||
* @return array Array
|
||||
*/
|
||||
public function fetch_row($resultset);
|
||||
// phpcs:enable
|
||||
public function fetch_row($resultset);
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
* Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field.
|
||||
@@ -52,23 +52,23 @@ interface Database
|
||||
* @param int $param Date TMS to convert
|
||||
* @return string Date in a string YYYYMMDDHHMMSS
|
||||
*/
|
||||
public function idate($param);
|
||||
public function idate($param);
|
||||
|
||||
/**
|
||||
* Return last error code
|
||||
*
|
||||
* @return string lasterrno
|
||||
*/
|
||||
public function lasterrno();
|
||||
public function lasterrno();
|
||||
|
||||
/**
|
||||
* Start transaction
|
||||
*
|
||||
* @return int 1 if transaction successfuly opened or already opened, 0 if error
|
||||
*/
|
||||
public function begin();
|
||||
public function begin();
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Create a new database
|
||||
* Do not use function xxx_create_db (xxx=mysql, ...) as they are deprecated
|
||||
@@ -80,15 +80,15 @@ interface Database
|
||||
* @param string $owner Username of database owner
|
||||
* @return resource resource defined if OK, null if KO
|
||||
*/
|
||||
public function DDLCreateDb($database, $charset = '', $collation = '', $owner = '');
|
||||
// phpcs:enable
|
||||
public function DDLCreateDb($database, $charset = '', $collation = '', $owner = '');
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
* Return version of database server into an array
|
||||
*
|
||||
* @return array Version array
|
||||
*/
|
||||
public function getVersionArray();
|
||||
public function getVersionArray();
|
||||
|
||||
/**
|
||||
* Convert a SQL request in Mysql syntax to native syntax
|
||||
@@ -99,25 +99,25 @@ interface Database
|
||||
*/
|
||||
public static function convertSQLFromMysql($line, $type = 'ddl');
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return the number of lines in the result of a request INSERT, DELETE or UPDATE
|
||||
*
|
||||
* @param resource $resultset Curseur de la requete voulue
|
||||
* @param resource $resultset Cursor of the desired request
|
||||
* @return int Number of lines
|
||||
* @see num_rows()
|
||||
*/
|
||||
public function affected_rows($resultset);
|
||||
// phpcs:enable
|
||||
public function affected_rows($resultset);
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
* Return description of last error
|
||||
*
|
||||
* @return string Error text
|
||||
*/
|
||||
public function error();
|
||||
public function error();
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* List tables into a database
|
||||
*
|
||||
@@ -125,15 +125,15 @@ interface Database
|
||||
* @param string $table Nmae of table filter ('xxx%')
|
||||
* @return array List of tables in an array
|
||||
*/
|
||||
public function DDLListTables($database, $table = '');
|
||||
// phpcs:enable
|
||||
public function DDLListTables($database, $table = '');
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
* Return last request executed with query()
|
||||
*
|
||||
* @return string Last query
|
||||
*/
|
||||
public function lastquery();
|
||||
public function lastquery();
|
||||
|
||||
/**
|
||||
* Define sort criteria of request
|
||||
@@ -142,7 +142,7 @@ interface Database
|
||||
* @param string $sortorder Sort order
|
||||
* @return string String to provide syntax of a sort sql string
|
||||
*/
|
||||
public function order($sortfield = null, $sortorder = null);
|
||||
public function order($sortfield = null, $sortorder = null);
|
||||
|
||||
/**
|
||||
* Decrypt sensitive data in database
|
||||
@@ -150,24 +150,24 @@ interface Database
|
||||
* @param string $value Value to decrypt
|
||||
* @return string Decrypted value if used
|
||||
*/
|
||||
public function decrypt($value);
|
||||
public function decrypt($value);
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return datas as an array
|
||||
*
|
||||
* @param resource $resultset Resultset of request
|
||||
* @return array Array
|
||||
*/
|
||||
public function fetch_array($resultset);
|
||||
// phpcs:enable
|
||||
public function fetch_array($resultset);
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
* Return last error label
|
||||
*
|
||||
* @return string lasterror
|
||||
*/
|
||||
public function lasterror();
|
||||
public function lasterror();
|
||||
|
||||
/**
|
||||
* Escape a string to insert data
|
||||
@@ -175,9 +175,9 @@ interface Database
|
||||
* @param string $stringtoencode String to escape
|
||||
* @return string String escaped
|
||||
*/
|
||||
public function escape($stringtoencode);
|
||||
public function escape($stringtoencode);
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Get last ID after an insert INSERT
|
||||
*
|
||||
@@ -185,23 +185,23 @@ interface Database
|
||||
* @param string $fieldid Field name
|
||||
* @return int Id of row
|
||||
*/
|
||||
public function last_insert_id($tab, $fieldid = 'rowid');
|
||||
// phpcs:enable
|
||||
public function last_insert_id($tab, $fieldid = 'rowid');
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
* Return full path of restore program
|
||||
*
|
||||
* @return string Full path of restore program
|
||||
*/
|
||||
public function getPathOfRestore();
|
||||
public function getPathOfRestore();
|
||||
|
||||
/**
|
||||
* Annulation d'une transaction et retour aux anciennes valeurs
|
||||
* Canceling a transaction and returning to old values
|
||||
*
|
||||
* @param string $log Add more log to default log line
|
||||
* @return int 1 si annulation ok ou transaction non ouverte, 0 en cas d'erreur
|
||||
* @return int 1 if cancelation ok or transaction not open, 0 if error
|
||||
*/
|
||||
public function rollback($log = '');
|
||||
public function rollback($log = '');
|
||||
|
||||
/**
|
||||
* Execute a SQL request and return the resultset
|
||||
@@ -212,7 +212,7 @@ interface Database
|
||||
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
|
||||
* @return resource Resultset of answer
|
||||
*/
|
||||
public function query($query, $usesavepoint = 0, $type = 'auto');
|
||||
public function query($query, $usesavepoint = 0, $type = 'auto');
|
||||
|
||||
/**
|
||||
* Connexion to server
|
||||
@@ -225,7 +225,7 @@ interface Database
|
||||
* @return resource Database access handler
|
||||
* @see close()
|
||||
*/
|
||||
public function connect($host, $login, $passwd, $name, $port = 0);
|
||||
public function connect($host, $login, $passwd, $name, $port = 0);
|
||||
|
||||
/**
|
||||
* Define limits and offset of request
|
||||
@@ -234,7 +234,7 @@ interface Database
|
||||
* @param int $offset Numero of line from where starting fetch
|
||||
* @return string String with SQL syntax to add a limit and offset
|
||||
*/
|
||||
public function plimit($limit = 0, $offset = 0);
|
||||
public function plimit($limit = 0, $offset = 0);
|
||||
|
||||
/**
|
||||
* Return value of server parameters
|
||||
@@ -242,7 +242,7 @@ interface Database
|
||||
* @param string $filter Filter list on a particular value
|
||||
* @return array Array of key-values (key=>value)
|
||||
*/
|
||||
public function getServerParametersValues($filter = '');
|
||||
public function getServerParametersValues($filter = '');
|
||||
|
||||
/**
|
||||
* Return value of server status
|
||||
@@ -250,16 +250,16 @@ interface Database
|
||||
* @param string $filter Filter list on a particular value
|
||||
* @return array Array of key-values (key=>value)
|
||||
*/
|
||||
public function getServerStatusValues($filter = '');
|
||||
public function getServerStatusValues($filter = '');
|
||||
|
||||
/**
|
||||
* Return collation used in database
|
||||
*
|
||||
* @return string Collation value
|
||||
*/
|
||||
public function getDefaultCollationDatabase();
|
||||
public function getDefaultCollationDatabase();
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return number of lines for result of a SELECT
|
||||
*
|
||||
@@ -267,77 +267,77 @@ interface Database
|
||||
* @return int Nb of lines
|
||||
* @see affected_rows()
|
||||
*/
|
||||
public function num_rows($resultset);
|
||||
// phpcs:enable
|
||||
public function num_rows($resultset);
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
* Return full path of dump program
|
||||
*
|
||||
* @return string Full path of dump program
|
||||
*/
|
||||
public function getPathOfDump();
|
||||
public function getPathOfDump();
|
||||
|
||||
/**
|
||||
* Return version of database client driver
|
||||
*
|
||||
* @return string Version string
|
||||
*/
|
||||
public function getDriverInfo();
|
||||
public function getDriverInfo();
|
||||
|
||||
/**
|
||||
* Return generic error code of last operation.
|
||||
*
|
||||
* @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...)
|
||||
*/
|
||||
public function errno();
|
||||
public function errno();
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Create a table into database
|
||||
*
|
||||
* @param string $table Name of table
|
||||
* @param array $fields Tableau associatif [nom champ][tableau des descriptions]
|
||||
* @param string $primary_key Nom du champ qui sera la clef primaire
|
||||
* @param string $type Type de la table
|
||||
* @param array $unique_keys Tableau associatifs Nom de champs qui seront clef unique => valeur
|
||||
* @param array $fulltext_keys Tableau des Nom de champs qui seront indexes en fulltext
|
||||
* @param array $keys Tableau des champs cles noms => valeur
|
||||
* @param array $fields Associative table [field name][table of descriptions]
|
||||
* @param string $primary_key Name of the field that will be the primary key
|
||||
* @param string $type Type of the table
|
||||
* @param array $unique_keys Associative array Name of fields that will be unique key => value
|
||||
* @param array $fulltext_keys Field name table that will be indexed in fulltext
|
||||
* @param array $keys Table of key fields names => value
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
public function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null);
|
||||
// phpcs:enable
|
||||
public function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null);
|
||||
// phpcs:enable
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Drop a table into database
|
||||
*
|
||||
* @param string $table Name of table
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
public function DDLDropTable($table);
|
||||
// phpcs:enable
|
||||
public function DDLDropTable($table);
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
* Return list of available charset that can be used to store data in database
|
||||
*
|
||||
* @return array List of Charset
|
||||
*/
|
||||
public function getListOfCharacterSet();
|
||||
public function getListOfCharacterSet();
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Create a new field into table
|
||||
*
|
||||
* @param string $table Name of table
|
||||
* @param string $field_name Name of field to add
|
||||
* @param string $field_desc Tableau associatif de description du champ a inserer[nom du parametre][valeur du parametre]
|
||||
* @param string $field_position Optionnel ex.: "after champtruc"
|
||||
* @param string $field_desc Associative array of description of the field to insert [parameter name][parameter value]
|
||||
* @param string $field_position Optional ex .: "after field stuff"
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function DDLAddField($table, $field_name, $field_desc, $field_position = "");
|
||||
// phpcs:enable
|
||||
public function DDLAddField($table, $field_name, $field_desc, $field_position = "");
|
||||
// phpcs:enable
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Drop a field from table
|
||||
*
|
||||
@@ -345,10 +345,10 @@ interface Database
|
||||
* @param string $field_name Name of field to drop
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function DDLDropField($table, $field_name);
|
||||
// phpcs:enable
|
||||
public function DDLDropField($table, $field_name);
|
||||
// phpcs:enable
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Update format of a field into a table
|
||||
*
|
||||
@@ -357,58 +357,58 @@ interface Database
|
||||
* @param string $field_desc Array with description of field format
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function DDLUpdateField($table, $field_name, $field_desc);
|
||||
// phpcs:enable
|
||||
public function DDLUpdateField($table, $field_name, $field_desc);
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
* Return list of available collation that can be used for database
|
||||
*
|
||||
* @return array List of Collation
|
||||
*/
|
||||
public function getListOfCollation();
|
||||
public function getListOfCollation();
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return a pointer of line with description of a table or field
|
||||
*
|
||||
* @param string $table Name of table
|
||||
* @param string $field Optionnel : Name of field if we want description of field
|
||||
* @param string $field Optional : Name of field if we want description of field
|
||||
* @return resource Resource
|
||||
*/
|
||||
public function DDLDescTable($table, $field = "");
|
||||
// phpcs:enable
|
||||
public function DDLDescTable($table, $field = "");
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
* Return version of database server
|
||||
*
|
||||
* @return string Version string
|
||||
*/
|
||||
public function getVersion();
|
||||
public function getVersion();
|
||||
|
||||
/**
|
||||
* Return charset used to store data in database
|
||||
*
|
||||
* @return string Charset
|
||||
*/
|
||||
public function getDefaultCharacterSetDatabase();
|
||||
public function getDefaultCharacterSetDatabase();
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Create a user and privileges to connect to database (even if database does not exists yet)
|
||||
*
|
||||
* @param string $dolibarr_main_db_host Ip serveur
|
||||
* @param string $dolibarr_main_db_user Nom user a creer
|
||||
* @param string $dolibarr_main_db_pass Mot de passe user a creer
|
||||
* @param string $dolibarr_main_db_host Server IP
|
||||
* @param string $dolibarr_main_db_user Username to create
|
||||
* @param string $dolibarr_main_db_pass User password to create
|
||||
* @param string $dolibarr_main_db_name Database name where user must be granted
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
public function DDLCreateUser(
|
||||
$dolibarr_main_db_host,
|
||||
$dolibarr_main_db_user,
|
||||
$dolibarr_main_db_pass,
|
||||
$dolibarr_main_db_name
|
||||
);
|
||||
// phpcs:enable
|
||||
* @return int <0 if KO, >=0 if OK
|
||||
*/
|
||||
public function DDLCreateUser(
|
||||
$dolibarr_main_db_host,
|
||||
$dolibarr_main_db_user,
|
||||
$dolibarr_main_db_pass,
|
||||
$dolibarr_main_db_name
|
||||
);
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
* Convert (by PHP) a PHP server TZ string date into a Timestamps date (GMT if gm=true)
|
||||
@@ -419,7 +419,7 @@ interface Database
|
||||
* @param bool $gm 1=Input informations are GMT values, otherwise local to server TZ
|
||||
* @return int|string Date TMS or ''
|
||||
*/
|
||||
public function jdate($string, $gm = false);
|
||||
public function jdate($string, $gm = false);
|
||||
|
||||
/**
|
||||
* Encrypt sensitive data in database
|
||||
@@ -429,7 +429,7 @@ interface Database
|
||||
* @param int $withQuotes Return string with quotes
|
||||
* @return string XXX(field) or XXX('value') or field or 'value'
|
||||
*/
|
||||
public function encrypt($fieldorvalue, $withQuotes = 0);
|
||||
public function encrypt($fieldorvalue, $withQuotes = 0);
|
||||
|
||||
/**
|
||||
* Validate a database transaction
|
||||
@@ -437,25 +437,25 @@ interface Database
|
||||
* @param string $log Add more log to default log line
|
||||
* @return int 1 if validation is OK or transaction level no started, 0 if ERROR
|
||||
*/
|
||||
public function commit($log = '');
|
||||
public function commit($log = '');
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* List information of columns into a table.
|
||||
*
|
||||
* @param string $table Name of table
|
||||
* @return array Array with inforation on table
|
||||
*/
|
||||
public function DDLInfoTable($table);
|
||||
// phpcs:enable
|
||||
* @return array Array with information on table
|
||||
*/
|
||||
public function DDLInfoTable($table);
|
||||
// phpcs:enable
|
||||
|
||||
/**
|
||||
/**
|
||||
* Free last resultset used.
|
||||
*
|
||||
* @param resource $resultset Fre cursor
|
||||
* @param resource $resultset Free cursor
|
||||
* @return void
|
||||
*/
|
||||
public function free($resultset = null);
|
||||
public function free($resultset = null);
|
||||
|
||||
/**
|
||||
* Close database connexion
|
||||
@@ -463,41 +463,41 @@ interface Database
|
||||
* @return boolean True if disconnect successfull, false otherwise
|
||||
* @see connect()
|
||||
*/
|
||||
public function close();
|
||||
public function close();
|
||||
|
||||
/**
|
||||
* Return last query in error
|
||||
*
|
||||
* @return string lastqueryerror
|
||||
*/
|
||||
public function lastqueryerror();
|
||||
public function lastqueryerror();
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return connexion ID
|
||||
*
|
||||
* @return string Id connexion
|
||||
*/
|
||||
public function DDLGetConnectId();
|
||||
// phpcs:enable
|
||||
public function DDLGetConnectId();
|
||||
// phpcs:enable
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Renvoie la ligne courante (comme un objet) pour le curseur resultset
|
||||
* Returns the current line (as an object) for the resultset cursor
|
||||
*
|
||||
* @param resource $resultset Curseur de la requete voulue
|
||||
* @param resource $resultset Cursor of the desired request
|
||||
* @return Object Object result line or false if KO or end of cursor
|
||||
*/
|
||||
public function fetch_object($resultset);
|
||||
// phpcs:enable
|
||||
public function fetch_object($resultset);
|
||||
// phpcs:enable
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Select a database
|
||||
*
|
||||
* @param string $database Name of database
|
||||
* @return boolean true if OK, false if KO
|
||||
*/
|
||||
public function select_db($database);
|
||||
// phpcs:enable
|
||||
public function select_db($database);
|
||||
// phpcs:enable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user