2009-05-11 13:05:56 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
* vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
|
2012-05-21 15:12:37 +04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-05-11 13:05:56 +04:00
|
|
|
|
2010-12-02 20:40:18 +03:00
|
|
|
#ifndef nsPlacesIndexes_h__
|
|
|
|
#define nsPlacesIndexes_h__
|
2009-05-11 13:05:56 +04:00
|
|
|
|
|
|
|
#define CREATE_PLACES_IDX(__name, __table, __columns, __type) \
|
|
|
|
NS_LITERAL_CSTRING( \
|
|
|
|
"CREATE " __type " INDEX IF NOT EXISTS " __table "_" __name \
|
|
|
|
" ON " __table " (" __columns ")" \
|
|
|
|
)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* moz_places
|
|
|
|
*/
|
2016-06-29 15:47:36 +03:00
|
|
|
#define CREATE_IDX_MOZ_PLACES_URL_HASH \
|
2009-05-11 13:05:56 +04:00
|
|
|
CREATE_PLACES_IDX( \
|
2016-06-29 15:47:36 +03:00
|
|
|
"url_hashindex", "moz_places", "url_hash", "" \
|
2009-05-11 13:05:56 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_PLACES_FAVICON \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"faviconindex", "moz_places", "favicon_id", "" \
|
|
|
|
)
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_PLACES_REVHOST \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"hostindex", "moz_places", "rev_host", "" \
|
|
|
|
)
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_PLACES_VISITCOUNT \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"visitcount", "moz_places", "visit_count", "" \
|
|
|
|
)
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_PLACES_FRECENCY \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"frecencyindex", "moz_places", "frecency", "" \
|
|
|
|
)
|
|
|
|
|
2009-05-15 03:28:03 +04:00
|
|
|
#define CREATE_IDX_MOZ_PLACES_LASTVISITDATE \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"lastvisitdateindex", "moz_places", "last_visit_date", "" \
|
|
|
|
)
|
|
|
|
|
2010-12-02 20:43:50 +03:00
|
|
|
#define CREATE_IDX_MOZ_PLACES_GUID \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"guid_uniqueindex", "moz_places", "guid", "UNIQUE" \
|
|
|
|
)
|
|
|
|
|
2009-05-11 13:05:56 +04:00
|
|
|
/**
|
|
|
|
* moz_historyvisits
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_HISTORYVISITS_PLACEDATE \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"placedateindex", "moz_historyvisits", "place_id, visit_date", "" \
|
|
|
|
)
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_HISTORYVISITS_FROMVISIT \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"fromindex", "moz_historyvisits", "from_visit", "" \
|
|
|
|
)
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_HISTORYVISITS_VISITDATE \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"dateindex", "moz_historyvisits", "visit_date", "" \
|
|
|
|
)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* moz_bookmarks
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_BOOKMARKS_PLACETYPE \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"itemindex", "moz_bookmarks", "fk, type", "" \
|
|
|
|
)
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_BOOKMARKS_PARENTPOSITION \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"parentindex", "moz_bookmarks", "parent, position", "" \
|
|
|
|
)
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_BOOKMARKS_PLACELASTMODIFIED \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"itemlastmodifiedindex", "moz_bookmarks", "fk, lastModified", "" \
|
|
|
|
)
|
|
|
|
|
2010-12-02 20:40:18 +03:00
|
|
|
#define CREATE_IDX_MOZ_BOOKMARKS_GUID \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"guid_uniqueindex", "moz_bookmarks", "guid", "UNIQUE" \
|
|
|
|
)
|
|
|
|
|
2009-05-11 13:05:56 +04:00
|
|
|
/**
|
|
|
|
* moz_annos
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_ANNOS_PLACEATTRIBUTE \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"placeattributeindex", "moz_annos", "place_id, anno_attribute_id", "UNIQUE" \
|
|
|
|
)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* moz_items_annos
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_ITEMSANNOS_PLACEATTRIBUTE \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"itemattributeindex", "moz_items_annos", "item_id, anno_attribute_id", "UNIQUE" \
|
|
|
|
)
|
|
|
|
|
2015-03-20 11:39:20 +03:00
|
|
|
/**
|
|
|
|
* moz_keywords
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define CREATE_IDX_MOZ_KEYWORDS_PLACEPOSTDATA \
|
|
|
|
CREATE_PLACES_IDX( \
|
|
|
|
"placepostdata_uniqueindex", "moz_keywords", "place_id, post_data", "UNIQUE" \
|
|
|
|
)
|
|
|
|
|
2010-12-02 20:40:18 +03:00
|
|
|
#endif // nsPlacesIndexes_h__
|