ezmashup_record.php
Ce fichier contient ldes utilitaires temporairement non disponibles dans spip.
Table of Contents
Constants
- _EZMASHUP_TARGET_SQL_DATE_FIELD_TYPES = ['DATE']
- _EZMASHUP_TARGET_SQL_DATETIME_FIELD_TYPES = ['DATETIME', 'TIMESTAMP']
- _EZMASHUP_TARGET_SQL_NUMERIC_FIELD_TYPES = ['BIT', 'TINYINT', 'BOOL', 'BOOLEAN', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT', 'FLOAT', 'DOUBLE', 'DECIMAL', 'DEC']
- _EZMASHUP_TARGET_SQL_TIME_FIELD_TYPES = ['TIME']
- _EZMASHUP_TARGET_SQL_YEAR_FIELD_TYPES = ['YEAR']
Functions
- record_initialiser() : array<string|int, mixed>
- Initialise le record d'un dataset cible avec des valeurs par défaut.
- record_remplir() : array<string|int, mixed>
- Initialise le record d'un dataset cible avec des valeurs par défaut.
- record_normaliser_champs_sql() : array<string|int, mixed>
- Renvoie la description normalisée SQL de la table.
Constants
_EZMASHUP_TARGET_SQL_DATE_FIELD_TYPES
public
mixed
_EZMASHUP_TARGET_SQL_DATE_FIELD_TYPES
= ['DATE']
_EZMASHUP_TARGET_SQL_DATETIME_FIELD_TYPES
public
mixed
_EZMASHUP_TARGET_SQL_DATETIME_FIELD_TYPES
= ['DATETIME', 'TIMESTAMP']
_EZMASHUP_TARGET_SQL_NUMERIC_FIELD_TYPES
public
mixed
_EZMASHUP_TARGET_SQL_NUMERIC_FIELD_TYPES
= ['BIT', 'TINYINT', 'BOOL', 'BOOLEAN', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT', 'FLOAT', 'DOUBLE', 'DECIMAL', 'DEC']
_EZMASHUP_TARGET_SQL_TIME_FIELD_TYPES
public
mixed
_EZMASHUP_TARGET_SQL_TIME_FIELD_TYPES
= ['TIME']
_EZMASHUP_TARGET_SQL_YEAR_FIELD_TYPES
public
mixed
_EZMASHUP_TARGET_SQL_YEAR_FIELD_TYPES
= ['YEAR']
Functions
record_initialiser()
Initialise le record d'un dataset cible avec des valeurs par défaut.
record_initialiser(array<string|int, mixed> $feed[, null|array<string|int, mixed> &$erreur = [] ]) : array<string|int, mixed>
Pour un dataset cible de type table SQL, les valeurs par défaut sont configurées dans la déclaration de la base. Les champs static sont initialisés avec les valeurs demandés dans la configuration.
Parameters
- $feed : array<string|int, mixed>
-
Description complète du feed.
- $erreur : null|array<string|int, mixed> = []
-
Tableau constitutif d'une erreur ou vide si aucune erreur à remonter
Return values
array<string|int, mixed> —Enregistrement par défaut de la cible initialisé ou vide si erreur.
record_remplir()
Initialise le record d'un dataset cible avec des valeurs par défaut.
record_remplir(array<string|int, mixed> $item_source, array<string|int, mixed> $feed[, null|array<string|int, mixed> &$erreur = [] ]) : array<string|int, mixed>
Pour un dataset cible de type table SQL, les valeurs par défaut sont configurées dans la déclaration de la base. Les champs static sont initialisés avec les valeurs demandés dans la configuration.
Parameters
- $item_source : array<string|int, mixed>
-
Description d'un item de la source dont certains champs seront insérés dans l'enregistrement cible
- $feed : array<string|int, mixed>
-
Description complète du feed.
- $erreur : null|array<string|int, mixed> = []
-
Tableau constitutif d'une erreur ou vide si aucune erreur à remonter
Return values
array<string|int, mixed> —Enregistrement de la cible mis à jour ou vide si erreur.
record_normaliser_champs_sql()
Renvoie la description normalisée SQL de la table.
record_normaliser_champs_sql(string $table) : array<string|int, mixed>
Parameters
- $table : string
-
Nom de la table SQL sans le préfixe
spip_
.
Return values
array<string|int, mixed> —Description de la table SQL normalisée.