1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CPSSQLCONSTS_H |
|
20 #define C_CPSSQLCONSTS_H |
|
21 #ifdef CONTENT_PUBLISHER_STORAGE_MT |
|
22 _LIT( KCPpathdatabase, "c:\\cpdatastorage.sq" ); |
|
23 #endif |
|
24 |
|
25 _LIT( KCPdatabase, "[20016B7B]cpdatastorage.sq" ); |
|
26 _LIT( KCPdatabaseDrive, "C:" ); |
|
27 _LIT8( KMdsSqlDbaConfig, |
|
28 "cache_size=10000; page_size=4096; encoding=\"UTF-8\";" ); |
|
29 |
|
30 //Create Tables |
|
31 _LIT( KSQLCreateMainTable, |
|
32 "CREATE TABLE CP_MAIN_TABLE( Id INTEGER PRIMARY KEY ,\ |
|
33 Publisher TEXT NOT NULL,\ |
|
34 Content_type TEXT NOT NULL,\ |
|
35 Content_id TEXT NOT NULL,\ |
|
36 Expiration_date BIGINT NOT NULL,\ |
|
37 Access_List BLOB,\ |
|
38 Data BLOB, \ |
|
39 Action BLOB, \ |
|
40 UNIQUE( Publisher, Content_type, Content_id ));" ); |
|
41 |
|
42 _LIT( KSQLCreatePublisherTable, |
|
43 "CREATE TABLE CP_PUBLISHER_TABLE( Id INTEGER PRIMARY KEY ,\ |
|
44 Publisher TEXT NOT NULL,\ |
|
45 Content_type TEXT NOT NULL,\ |
|
46 Content_id TEXT NOT NULL, \ |
|
47 Flag INTEGER NOT NULL, \ |
|
48 Access_List BLOB,\ |
|
49 Data BLOB, \ |
|
50 Action BLOB, \ |
|
51 UNIQUE( Publisher, Content_type, Content_id ));" ); |
|
52 |
|
53 //Create Indexes |
|
54 _LIT( KSQLIndexOnMain_Publisher, |
|
55 "CREATE INDEX Main_PublisherIndex ON CP_MAIN_TABLE(Publisher);" ); |
|
56 _LIT( KSQLIndexOnMain_Content_type, |
|
57 "CREATE INDEX Main_Content_typeIndex ON CP_MAIN_TABLE(Content_type);" ); |
|
58 |
|
59 _LIT( KSQLIndexOnPub_Content_type, |
|
60 "CREATE INDEX Pub_Content_typeIndex ON CP_PUBLISHER_TABLE(Content_type);" ); |
|
61 _LIT( KSQLIndexOnPub_Content_type_Content_id, |
|
62 "CREATE INDEX Pub_Content_type_Content_Id_Index ON CP_PUBLISHER_TABLE(Content_type,Content_id);" ); |
|
63 |
|
64 #endif //C_CPSSQLCONSTS_H |
|