|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Global strings, whic are declared once in this header file and used in the SQL server source files. |
|
15 // Make sure that __SQLSRV_STRINGS__ macro is defined only once in SqlSrvStrings.cpp file, before the |
|
16 // include of "SqlSrvStrings.h", which ensures that only one copy of the strings is included in the |
|
17 // executable server image. |
|
18 // |
|
19 // |
|
20 |
|
21 #ifndef __SQLSRVSTRINGS_H__ |
|
22 #define __SQLSRVSTRINGS_H__ |
|
23 |
|
24 #include <e32std.h> |
|
25 |
|
26 #ifdef __SQLSRV_STRINGS__ |
|
27 #define CONST_LIT8(var, val) extern const TLitC8<sizeof(val)> var = {sizeof(val) - 1, val} |
|
28 #define CONST_LIT16(var, val) extern const TLitC16<sizeof(L##val)/2> var = {sizeof(L##val)/2 - 1, L##val} |
|
29 #define CONST_TTEXT(var, val) extern const TText var = val |
|
30 #else |
|
31 #define CONST_LIT8(var, val) extern const TLitC8<sizeof(val)> var |
|
32 #define CONST_LIT16(var, val) extern const TLitC16<sizeof(L##val)/2> var |
|
33 #define CONST_TTEXT(var, val) extern const TText var |
|
34 #endif |
|
35 |
|
36 #ifdef _UNICODE |
|
37 #define CONST_LIT(var, val) CONST_LIT16(var, val) |
|
38 #else |
|
39 #define CONST_LIT(var, val) CONST_LIT8(var, val) |
|
40 #endif |
|
41 |
|
42 //System table names |
|
43 //If you need to change the system tables name prefix, please check SqlSrvDbSysSettings.cpp file, |
|
44 //where this prefix is used in sql statements and modify the statements. |
|
45 CONST_LIT8(KSqlitePrefix8, "sqlite_"); |
|
46 CONST_LIT8(KSystemPrefix8, "symbian_"); |
|
47 CONST_LIT8(KMasterTable8, "sqlite_master"); |
|
48 CONST_LIT8(KSecurityTable8, "symbian_security"); |
|
49 CONST_LIT8(KSettingsTable8, "symbian_settings"); |
|
50 |
|
51 CONST_LIT16(KSqlitePrefix16, "sqlite_"); |
|
52 CONST_LIT16(KSystemPrefix16, "symbian_"); |
|
53 CONST_LIT16(KMasterTable16, "sqlite_master"); |
|
54 CONST_LIT16(KSecurityTable16, "symbian_security"); |
|
55 CONST_LIT16(KSettingsTable16, "symbian_settings"); |
|
56 |
|
57 // config consts |
|
58 #ifdef SYSLIBS_TEST |
|
59 CONST_LIT16(KSqlSrvDefaultConfigFile, "c:\\test\\t_sqlserver.cfg"); |
|
60 CONST_LIT16(KSqlSrvDbConfigFileFormat, "c:cfg*"); |
|
61 #else |
|
62 CONST_LIT16(KSqlSrvDefaultConfigFile, "z:SqlServer.cfg"); |
|
63 CONST_LIT16(KSqlSrvDbConfigFileFormat, "z:cfg*"); |
|
64 #endif |
|
65 CONST_LIT8(KSoftHeapLimitKb,"soft_heap_limit_kb"); |
|
66 CONST_LIT8(KCompactionMode,"compaction"); |
|
67 CONST_LIT8(KFreePageThresholdKb,"free_space_threshold_kb"); |
|
68 CONST_LIT8(KUTF8,"UTF-8"); |
|
69 CONST_LIT8(KUTF8Q,"\"UTF-8\""); |
|
70 CONST_LIT8(KUTF16,"UTF-16"); |
|
71 CONST_LIT8(KUTF16Q,"\"UTF-16\""); |
|
72 CONST_LIT8(KManual,"manual"); |
|
73 CONST_LIT8(KBackground,"background"); |
|
74 CONST_LIT8(KAuto,"auto"); |
|
75 CONST_LIT8(KSynchronous,"synchronous"); |
|
76 |
|
77 //System database names |
|
78 CONST_LIT16(KMainDb16, "main"); |
|
79 CONST_LIT8(KMainDb8, "main"); |
|
80 CONST_LIT8(KTempDb8, "temp"); |
|
81 |
|
82 //Setting isolation level SQL statements (zero-terminated strings) |
|
83 CONST_LIT8(KReadUncommittedPragma, "PRAGMA read_uncommitted = True;\x0"); |
|
84 CONST_LIT8(KSerializablePragma, "PRAGMA read_uncommitted = False;\x0"); |
|
85 |
|
86 //Format of the file name when sending file handles in it |
|
87 CONST_LIT16(KFileHandleFmt, "|%d%08X%S%08X%S|\x0"); |
|
88 const TUint KFileHandleSeparator = '|'; |
|
89 |
|
90 //SQlite Pragma Commands |
|
91 CONST_LIT8(KAutoVacuum, "auto_vacuum"); |
|
92 CONST_LIT8(KCacheSize, "cache_size"); |
|
93 CONST_LIT8(KCaseSensitiveLike, "case_sensitive_like"); |
|
94 CONST_LIT8(KCountChanges, "count_changes"); |
|
95 CONST_LIT8(KDefaultCacheSize, "default_cache_size"); |
|
96 CONST_LIT8(KEmptyResultCallbacks, "empty_result_callbacks"); |
|
97 CONST_LIT8(KEncoding, "encoding"); |
|
98 CONST_LIT8(KFullColumnNames, "full_column_names"); |
|
99 CONST_LIT8(KFullfsync, "fullfsync"); |
|
100 CONST_LIT8(KIncrementalVacuum, "incremental_vacuum"); |
|
101 CONST_LIT8(KJournalMode, "journal_mode"); |
|
102 CONST_LIT8(KJournalSizeLimit, "journal_size_limit"); |
|
103 CONST_LIT8(KLegacyFileFormat, "legacy_file_format"); |
|
104 CONST_LIT8(KLockingMode, "locking_mode"); |
|
105 CONST_LIT8(KPageSize, "page_size"); |
|
106 CONST_LIT8(KMaxPageCount, "max_page_count"); |
|
107 CONST_LIT8(KReadUncommitted, "read_uncommitted"); |
|
108 CONST_LIT8(KShortColumnNames, "short_column_names"); |
|
109 CONST_LIT8(KSynchronousFlag, "synchronous"); |
|
110 CONST_LIT8(KTempStore, "temp_store"); |
|
111 CONST_LIT8(KTempStoreDirectory, "temp_store_directory"); |
|
112 CONST_LIT8(KDatabaseList, "database_list"); |
|
113 CONST_LIT8(KForeignKeyList, "foreign_key_list"); |
|
114 CONST_LIT8(KFreelistCount, "freelist_count"); |
|
115 CONST_LIT8(KIndexInfo, "index_info"); |
|
116 CONST_LIT8(KIndexIist, "index_list"); |
|
117 CONST_LIT8(KPageCount, "page_count"); |
|
118 CONST_LIT8(KTableInfo, "table_info"); |
|
119 CONST_LIT8(KSchemaVersion, "schema_version"); |
|
120 CONST_LIT8(KUserVersion, "user_version"); |
|
121 CONST_LIT8(KIntegrityCheck, "integrity_check"); |
|
122 CONST_LIT8(KParserTrace, "parser_trace"); |
|
123 CONST_LIT8(KVdbeTrace, "vdbe_trace"); |
|
124 CONST_LIT8(KdbeListing, "vdbe_listing"); |
|
125 |
|
126 |
|
127 #endif//__SQLSRVSTRINGS_H__ |