The "xwikistatsdoc" Table

The xwikistatsdoc table corresponds to the com.xpn.xwiki.stats.impl.DocumentStats class and it stores information about XWiki pages and spaces view and edit statistics.

In case you haven't enabled the Statistics plugin on your wiki, the xwikistatsdoc table will be empty. 

The mapping information is available in the xwiki.hbm.xml file:

<class name="com.xpn.xwiki.stats.impl.DocumentStats" table="xwikistatsdoc">
 <id name="id" type="long" unsaved-value="undefined">
   <column name="XWS_ID" not-null="true" />
   <generator class="assigned" />
 </id>
 <property name="number" type="integer" column="XWS_NUMBER" not-null="false" />
 <property name="name" type="string" column="XWS_NAME" not-null="true" length="255" index="XWDS_NAME" />
 <!-- Before XWiki 2.2M2 this column was always containing the "internal" string to tell the storage
       implementation Stats objects were special. Starting with XWiki 2.2M2 the check is now on whether the class
       name is empty ("") or null. Thus this column can now contain both "internal" (old stats) and ""
       (new stats) -->

 <property name="className" type="string" column="XWS_CLASSNAME" length="255" />
 <property name="action" type="string" column="XWS_ACTION" not-null="true" length="255" index="XWDS_ACTION" />
 <property name="pageViews" type="integer" column="XWS_PAGE_VIEWS" index="XWDS_PAGE_VIEWS" not-null="false" />
 <property name="uniqueVisitors" type="integer" column="XWS_UNIQUE_VISITORS" index="XWDS_UNIQUE_VISITORS" not-null="false" />
 <property name="period" type="integer" column="XWS_PERIOD" index="XWDS_PERIOD" not-null="false" />
 <property name="visits" type="integer" column="XWS_VISITS" index="XWDS_VISITS" not-null="false" />
</class>

The columns of the xwikistatsdoc table are:

ColumnData typeClass propertynot-nullIndex
XWS_ID (primary key)bigint(20)-true-
XWS_NUMBERint(11)numberfalse-
XWS_NAMEvarchar(255)nametrueXWDS_NAME
XWS_CLASSNAMEvarchar(255)className--
XWS_ACTIONvarchar(255)actiontrueXWDS_ACTION
XWS_PAGE_VIEWSint(11)pageViewsfalseXWDS_PAGE_VIEWS
XWS_UNIQUE_VISITORSint(11)uniqueVisitorsfalseXWDS_UNIQUE_VISITORS
XWS_PERIODint(11)periodfalseXWDS_PERIOD
XWS_VISITSint(11)visitsfalseXWDS_VISITS

     

Related Pages

Search this space