You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ba...@apache.org on 2008/08/02 15:56:39 UTC
svn commit: r681976 - /james/server/branches/v2.3/src/conf/sqlResources.xml
Author: bago
Date: Sat Aug 2 06:56:38 2008
New Revision: 681976
URL: http://svn.apache.org/viewvc?rev=681976&view=rev
Log:
Backported sqlResources.xml configuration for JDBCBayesianMailet to v2.3 (support derby and postgresql) (see JAMES-849)
Modified:
james/server/branches/v2.3/src/conf/sqlResources.xml
Modified: james/server/branches/v2.3/src/conf/sqlResources.xml
URL: http://svn.apache.org/viewvc/james/server/branches/v2.3/src/conf/sqlResources.xml?rev=681976&r1=681975&r2=681976&view=diff
==============================================================================
--- james/server/branches/v2.3/src/conf/sqlResources.xml (original)
+++ james/server/branches/v2.3/src/conf/sqlResources.xml Sat Aug 2 06:56:38 2008
@@ -1,3 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ -->
<!-- SQL Statements used by James for database access. -->
<sqlResources>
@@ -674,6 +692,16 @@
<!-- Statements used to update the spam token counts. -->
<sql name="updateSpamToken">UPDATE bayesiananalysis_spam SET OCCURRENCES=(OCCURRENCES + ?) WHERE (TOKEN=?)</sql>
+ <!-- Statements used to delete ham tokens. -->
+ <sql name="deleteHamTokens">DELETE FROM bayesiananalysis_ham</sql>
+
+ <!-- Statements used to delete spam tokens. -->
+ <sql name="deleteSpamTokens">DELETE FROM bayesiananalysis_spam</sql>
+
+ <!-- Statements used to delete message counts. -->
+ <sql name="deleteMessageCounts">DELETE FROM bayesiananalysis_messagecounts</sql>
+
+
<!-- Statements used to create the "ham" table (the 'token' field must be case sensitive). -->
<sql name="createHamTable" db="mysql">
CREATE TABLE bayesiananalysis_ham (
@@ -689,6 +717,20 @@
PRIMARY KEY (token)
)
</sql>
+ <sql name="createHamTable" db="derby">
+ CREATE TABLE bayesiananalysis_ham (
+ token varchar(128) NOT NULL,
+ occurrences INTEGER NOT NULL default 0,
+ PRIMARY KEY (token)
+ )
+ </sql>
+ <sql name="createHamTable" db="postgresql">
+ CREATE TABLE bayesiananalysis_ham (
+ token varchar(128) NOT NULL,
+ occurrences int NOT NULL default 0,
+ PRIMARY KEY (token)
+ )
+ </sql>
<!-- Statements used to create the "spam" table (the 'token' field must be case sensitive). -->
<sql name="createSpamTable" db="mysql">
@@ -705,6 +747,20 @@
PRIMARY KEY (token)
)
</sql>
+ <sql name="createSpamTable" db="derby">
+ CREATE TABLE bayesiananalysis_spam (
+ token varchar (128) NOT NULL,
+ occurrences INTEGER NOT NULL default 0,
+ PRIMARY KEY (token)
+ )
+ </sql>
+ <sql name="createSpamTable" db="postgresql">
+ CREATE TABLE bayesiananalysis_spam (
+ token varchar (128) NOT NULL,
+ occurrences int NOT NULL default 0,
+ PRIMARY KEY (token)
+ )
+ </sql>
<!-- Statements used to create the "message counts" table. -->
<sql name="createMessageCountsTable" db="mysql">
@@ -719,7 +775,18 @@
[spamcount] [int] NOT NULL default (0)
)
</sql>
-
+ <sql name="createMessageCountsTable" db="derby">
+ CREATE TABLE bayesiananalysis_messagecounts (
+ hamcount INTEGER NOT NULL default 0,
+ spamcount INTEGER NOT NULL default 0
+ )
+ </sql>
+ <sql name="createMessageCountsTable" db="postgresql">
+ CREATE TABLE bayesiananalysis_messagecounts (
+ hamcount int NOT NULL default 0,
+ spamcount int NOT NULL default 0
+ )
+ </sql>
</sqlDefs>
<!-- SQL statements to support the WhiteListManager mailet and the IsInWhiteList matcher -->
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org