00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef MMSCONFIGQUERIES_H_
00034 #define MMSCONFIGQUERIES_H_
00035
00036
00037
00038
00039
00040
00041 #define PLUGINDAO_SAVE(ID, Name, Title, Description, Filename, Path, Active, Icon, Icon_s, Icon_small, Icon_small_s, CategoryID, Orderpos, Version) \
00042 "insert into Plugins(PluginTypeID,PluginName,PluginTitle,PluginDescription,Filename,PluginPath,Active,Icon,SelectedIcon,SmallIcon,SmallSelectedIcon,CategoryID,Orderpos,Version) values('" \
00043 + ID + "','" \
00044 + Name + "','" \
00045 + Title + "','" \
00046 + Description + "','" \
00047 + Filename + "','" \
00048 + Path + "','" \
00049 + Active + "','" \
00050 + Icon + "','" \
00051 + Icon_s + "','" \
00052 + Icon_small + "','" \
00053 + Icon_small_s + "','" \
00054 + CategoryID + "','" \
00055 + Orderpos + "','" \
00056 + Version + "')"
00057
00058 #define PLUGINDAO_UPDATE(Filename, Active, Description, CategoryID, Orderpos, ID, Version) \
00059 "update Plugins set Filename='" + Filename + "'," \
00060 + "Active='" + Active + "'," \
00061 + "PluginDescription='" + Description + "', " + \
00062 + "CategoryID='" + CategoryID + "', " + \
00063 + "Orderpos='" + Orderpos + "', " + \
00064 + "Version='" + Version + "' " + \
00065 "where ID = '" + ID + "'"
00066
00067 #define PLUGINDAO_FIND_ALL_ACTIVE_PLUGINS \
00068 "select Plug.*, Cat.CategoryName, PlugType.PluginTypeName from Plugins Plug left join Category Cat ON Cat.ID = Plug.CategoryID left join PluginTypes PlugType ON PlugType.ID = Plug.PluginTypeID where Plug.Active = 'Y' and Plug.ID != -2"
00069
00070 #define PLUGINDAO_FIND_ALL_PLUGINS \
00071 "select Plug.*, Cat.CategoryName, PlugType.PluginTypeName from Plugins Plug left join Category Cat ON Cat.ID = Plug.CategoryID left join PluginTypes PlugType ON PlugType.ID = Plug.PluginTypeID where Plug.ID != -2"
00072
00073 #define PLUGINDAO_F_PLUGIN_BY_NAME(Name) \
00074 "select Plug.*, Cat.CategoryName, PlugType.PluginTypeName from Plugins Plug left join Category Cat ON Cat.ID = Plug.CategoryID left join PluginTypes PlugType ON PlugType.ID = Plug.PluginTypeID where Plug.PluginName = '" + Name + "';"
00075
00076 #define PLUGINDAO_F_PLUGIN_BY_ID(ID) \
00077 "select Plug.*, Cat.CategoryName, PlugType.PluginTypeName from Plugins Plug left join Category Cat ON Cat.ID = Plug.CategoryID left join PluginTypes PlugType ON PlugType.ID = Plug.PluginTypeID where Plug.ID = " + ID
00078
00079 #define PLUGINDAO_F_ACTIVE_PLUGINS_BY_CATEGORY(CATEGORY) \
00080 "select Plug.*,Cat.CategoryName,Types.PluginTypename from Plugins Plug left join Category Cat ON Cat.CategoryName ='" + CATEGORY + "' left join PluginTypes Types ON Types.ID = Plug.PluginTypeID WHERE Plug.CategoryID = Cat.ID and Plug.Active = 'Y'"
00081
00082 #define PLUGINDAO_F_ALL_PLUGINS_BY_CATEGORY(CATEGORY) \
00083 "select Plug.*,Cat.CategoryName,Types.PluginTypename from Plugins Plug left join Category Cat ON Cat.CategoryName ='" + CATEGORY + "' left join PluginTypes Types ON Types.ID = Plug.PluginTypeID WHERE Plug.CategoryID = Cat.ID"
00084
00085 #define PLUGINDAO_F_ACTIVE_PLUGINS_BY_TYPE(TYPE) \
00086 "select Plug.*,Cat.CategoryName,Types.PluginTypeName from Plugins Plug left join Category Cat ON Cat.ID = Plug.CategoryID left join PluginTypes Types ON Types.ID = Plug.PluginTypeID where Types.PluginTypeName = '" + TYPE + "' and Plug.Active = 'Y'"
00087
00088 #define PLUGINDAO_F_ALL_PLUGINS_BY_TYPE(TYPE) \
00089 "select Plug.*,Cat.CategoryName,Types.PluginTypeName from Plugins Plug left join Category Cat ON Cat.ID = Plug.CategoryID left join PluginTypes Types ON Types.ID = Plug.PluginTypeID where Types.PluginTypeName = '" + TYPE + "'"
00090
00091
00092
00093
00094
00095
00096 #define PLUGINPROPERTYDAO_FIND_ALL_PLUGIN_PROPERTIES_BY_PLUGIN(ID) \
00097 "select * from PluginProperties where PluginID = " + ID
00098
00099 #endif