sbLocalDatabaseSQL.h
Go to the documentation of this file.
1 #ifndef SBLOCALDATABASESQL_H_
2 #define SBLOCALDATABASESQL_H_
3 
4 /*
5 //
6 // BEGIN SONGBIRD GPL
7 //
8 // This file is part of the Songbird web player.
9 //
10 // Copyright(c) 2005-2008 POTI, Inc.
11 // http://songbirdnest.com
12 //
13 // This file may be licensed under the terms of of the
14 // GNU General Public License Version 2 (the "GPL").
15 //
16 // Software distributed under the License is distributed
17 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
18 // express or implied. See the GPL for the specific language
19 // governing rights and limitations.
20 //
21 // You should have received a copy of the GPL along with this
22 // program. If not, go to http://www.gnu.org/licenses/gpl.html
23 // or write to the Free Software Foundation, Inc.,
24 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25 //
26 // END SONGBIRD GPL
27 //
28 */
29 
30 #include <nsStringAPI.h>
31 #include <nsTArray.h>
32 
40 {
41 public:
45  nsString MediaItemSelect();
49  static nsString SecondaryPropertySelect();
54  static nsString MediaItemsFtsAllDelete();
59  static nsString MediaItemsFtsAllInsert();
63  static nsString LibraryMediaItemsPropertiesSelect();
67  nsString LibraryMediaItemSelect();
72  static nsString PropertiesTableInsert();
76  static nsString PropertiesSelect();
80  static nsString PropertiesInsert();
84  static nsString PropertiesDelete();
85 
86  // These are the number of "IN" bind variables for statements which use them.
87  // They are tuned to optimize performance.
88  static const int MediaItemBindCount = 50;
89  static const int SecondaryPropertyBindCount = 50;
90 
91 private:
92  nsString mMediaItemColumns;
93  nsString mMediaItemColumnsWithID;
94  nsString mLibraryMediaItemSelect;
95 
96  nsString MediaItemColumns(PRBool aIncludeMediaItem);
97 };
98 
99 #endif /* SBLOCALDATABASEPRIMARYPROPERTYSELECT_H_ */
static const int MediaItemBindCount
static nsString PropertiesDelete()
static nsString MediaItemsFtsAllDelete()
static nsString MediaItemsFtsAllInsert()
static nsString PropertiesTableInsert()
static const int SecondaryPropertyBindCount
static nsString PropertiesInsert()
static nsString LibraryMediaItemsPropertiesSelect()
static nsString PropertiesSelect()
static nsString SecondaryPropertySelect()