\LibMelanie\SqlSqlMelanieRequests

Liste des requêtes SQL Generique Melanie2

Summary

Methods
Properties
Constants
No public methods found
No public properties found
listUserObjects
functionListUserObjects
getDefaultObject
functionGetDefaultObject
listSharedObjects
functionListSharedObjects
listObjectsByUid
functionListObjectsByUid
listObjectsByUidAndUser
functionListObjectsByUidAndUser
getUserPref
getNextObject
insertObject
deleteObject1
deleteObject2
deleteObject3
deleteObject4
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

listUserObjects

listUserObjects ="SELECT hd.datatree_id as {datatree_id}, user_uid as {user_uid}, datatree_name as {datatree_name}, datatree_ctag as {datatree_ctag}, datatree_synctoken as {datatree_synctoken}, attribute_value as {attribute_value}, '30' as {perm_object} FROM horde_datatree hd INNER JOIN horde_datatree_attributes USING (datatree_id) WHERE group_uid = :group_uid AND user_uid = :user_uid AND attribute_name = :attribute_name;" :string

functionListUserObjects

functionListUserObjects ="SELECT datatree_id as {datatree_id}, user_uid as {user_uid}, datatree_name as {datatree_name}, datatree_ctag as {datatree_ctag}, datatree_synctoken as {datatree_synctoken}, attribute_value as {attribute_value}, perm_object as {perm_object} FROM listUserObjects(:group_uid, :user_uid, :attribute_name);" :string

getDefaultObject

getDefaultObject ="SELECT hd.datatree_id as {datatree_id}, hd.user_uid as {user_uid}, hd.datatree_name as {datatree_name}, hd.datatree_ctag as {datatree_ctag}, hd.datatree_synctoken as {datatree_synctoken}, hda2.attribute_value as {attribute_value}, hda1.attribute_value as {perm_object} FROM horde_prefs hp INNER JOIN horde_datatree hd ON hp.pref_value = hd.datatree_name INNER JOIN horde_datatree_attributes hda1 ON hd.datatree_id = hda1.datatree_id INNER JOIN horde_datatree_attributes hda2 ON (hd.datatree_id = hda2.datatree_id) WHERE (hda1.attribute_name = :attribute_perm OR hda1.attribute_name = :attribute_permfg) AND hda1.attribute_key = :user_uid AND hd.group_uid = :group_uid AND hda2.attribute_name = :attribute_name AND hp.pref_scope = :pref_scope AND hp.pref_name = :pref_name AND hp.pref_uid = :user_uid LIMIT 1;" :string

functionGetDefaultObject

functionGetDefaultObject ="SELECT datatree_id as {datatree_id}, user_uid as {user_uid}, datatree_name as {datatree_name}, datatree_ctag as {datatree_ctag}, datatree_synctoken as {datatree_synctoken}, attribute_value as {attribute_value}, perm_object as {perm_object} FROM getDefaultObject(:user_uid, :pref_scope, :pref_name, :group_uid, :attribute_name, :attribute_perm, :attribute_permfg);" :string

listSharedObjects

listSharedObjects ="SELECT hd1.datatree_id as {datatree_id}, hd1.user_uid as {user_uid}, hd1.datatree_name as {datatree_name}, hd1.datatree_ctag as {datatree_ctag}, hd1.datatree_synctoken as {datatree_synctoken}, hda2.attribute_value as {attribute_value}, hda1.attribute_value as {perm_object} FROM horde_datatree hd1 INNER JOIN horde_datatree_attributes hda1 ON hd1.datatree_id = hda1.datatree_id INNER JOIN horde_datatree_attributes hda2 ON (hd1.datatree_id = hda2.datatree_id) WHERE (hda1.attribute_name = :attribute_perm OR hda1.attribute_name = :attribute_permfg) AND hda1.attribute_key = :user_uid AND hd1.group_uid = :group_uid AND hda2.attribute_name = :attribute_name;" :string

functionListSharedObjects

functionListSharedObjects ="SELECT datatree_id as {datatree_id}, user_uid as {user_uid}, datatree_name as {datatree_name}, datatree_ctag as {datatree_ctag}, datatree_synctoken as {datatree_synctoken}, attribute_value as {attribute_value}, perm_object as {perm_object} FROM listSharedObjects(:group_uid, :user_uid, :attribute_name, :attribute_perm, :attribute_permfg);" :string

listObjectsByUid

listObjectsByUid ="SELECT hd1.datatree_id as {datatree_id}, hd1.user_uid as {user_uid}, hd1.datatree_name as {datatree_name}, hd1.datatree_ctag as {datatree_ctag}, hd1.datatree_synctoken as {datatree_synctoken}, hda2.attribute_value as {attribute_value}, hda1.attribute_value as {perm_object} FROM horde_datatree hd1 INNER JOIN horde_datatree_attributes hda1 ON hd1.datatree_id = hda1.datatree_id INNER JOIN horde_datatree_attributes hda2 ON (hd1.datatree_id = hda2.datatree_id) WHERE (hda1.attribute_name = :attribute_perm OR hda1.attribute_name = :attribute_permfg) AND hd1.group_uid = :group_uid AND hda2.attribute_name = :attribute_name AND hd1.datatree_name = :datatree_name;" :string

functionListObjectsByUid

functionListObjectsByUid ="SELECT datatree_id as {datatree_id}, user_uid as {user_uid}, datatree_name as {datatree_name}, datatree_ctag as {datatree_ctag}, datatree_synctoken as {datatree_synctoken}, attribute_value as {attribute_value}, perm_object as {perm_object} FROM listObjectsByUid(:group_uid, :datatree_name, :attribute_name, :attribute_perm, :attribute_permfg);" :string

listObjectsByUidAndUser

listObjectsByUidAndUser ="SELECT hd1.datatree_id as {datatree_id}, hd1.user_uid as {user_uid}, hd1.datatree_name as {datatree_name}, hd1.datatree_ctag as {datatree_ctag}, hd1.datatree_synctoken as {datatree_synctoken}, hda2.attribute_value as {attribute_value}, hda1.attribute_value as {perm_object} FROM horde_datatree hd1 INNER JOIN horde_datatree_attributes hda1 ON hd1.datatree_id = hda1.datatree_id INNER JOIN horde_datatree_attributes hda2 ON (hd1.datatree_id = hda2.datatree_id) WHERE (hda1.attribute_name = :attribute_perm OR hda1.attribute_name = :attribute_permfg) AND hda1.attribute_key = :user_uid AND hd1.group_uid = :group_uid AND hda2.attribute_name = :attribute_name AND hd1.datatree_name = :datatree_name;" :string

functionListObjectsByUidAndUser

functionListObjectsByUidAndUser ="SELECT datatree_id as {datatree_id}, user_uid as {user_uid}, datatree_name as {datatree_name}, datatree_ctag as {datatree_ctag}, datatree_synctoken as {datatree_synctoken}, attribute_value as {attribute_value}, perm_object as {perm_object} FROM listObjectsByUidAndUser(:group_uid, :user_uid, :datatree_name, :attribute_name, :attribute_perm, :attribute_permfg);" :string

getUserPref

getUserPref ="SELECT pref_value as {pref_name} FROM horde_prefs WHERE pref_uid = :user_uid AND pref_scope = :pref_scope AND pref_name = :pref_name LIMIT 1;" :string

getNextObject

getNextObject ="SELECT nextval('horde_datatree_seq') as datatree_id;" :string

insertObject

insertObject ="INSERT INTO horde_datatree (datatree_id, group_uid, user_uid, datatree_name, datatree_ctag, datatree_parents) VALUES (:datatree_id, :group_uid, :user_uid, :datatree_name, :datatree_ctag, '');" :string

deleteObject1

deleteObject1 ="DELETE FROM horde_datatree_attributes WHERE datatree_id = :datatree_id;" :string

Suppression d'un objet Mélanie2

deleteObject2

deleteObject2 ="DELETE FROM horde_datatree WHERE datatree_id = :datatree_id;"

deleteObject3

deleteObject3 ="DELETE FROM {objects_table} WHERE {datatree_name} = :datatree_name;"

deleteObject4

deleteObject4 ="DELETE FROM horde_histories WHERE object_uid LIKE :object_uid;"