Changed 'number' column to 'count' as number is a reserved word in Oracle

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@2364 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Graham Triggs
2007-11-26 10:21:46 +00:00
parent 3ddbccad9b
commit 54058b0aff
3 changed files with 14 additions and 14 deletions

View File

@@ -66,10 +66,10 @@ public class ItemCountDAOOracle implements ItemCountDAO
private String collectionSelect = "SELECT * FROM collection_item_count WHERE collection_id = ?";
/** SQL to insert a new collection record */
private String collectionInsert = "INSERT INTO collection_item_count (collection_id, number) VALUES (?, ?)";
private String collectionInsert = "INSERT INTO collection_item_count (collection_id, count) VALUES (?, ?)";
/** SQL to update an existing collection record */
private String collectionUpdate = "UPDATE collection_item_count SET number = ? WHERE collection_id = ?";
private String collectionUpdate = "UPDATE collection_item_count SET count = ? WHERE collection_id = ?";
/** SQL to remove a collection record */
private String collectionRemove = "DELETE FROM collection_item_count WHERE collection_id = ?";
@@ -78,10 +78,10 @@ public class ItemCountDAOOracle implements ItemCountDAO
private String communitySelect = "SELECT * FROM community_item_count WHERE community_id = ?";
/** SQL to insert a new community record */
private String communityInsert = "INSERT INTO community_item_count (community_id, number) VALUES (?, ?)";
private String communityInsert = "INSERT INTO community_item_count (community_id, count) VALUES (?, ?)";
/** SQL to update an existing community record */
private String communityUpdate = "UPDATE community_item_count SET number = ? WHERE community_id = ?";
private String communityUpdate = "UPDATE community_item_count SET count = ? WHERE community_id = ?";
/** SQL to remove a community record */
private String communityRemove = "DELETE FROM community_item_count WHERE community_id = ?";
@@ -287,7 +287,7 @@ public class ItemCountDAOOracle implements ItemCountDAO
tri.close();
return tr.getIntColumn("number");
return tr.getIntColumn("count");
}
catch (SQLException e)
{
@@ -325,7 +325,7 @@ public class ItemCountDAOOracle implements ItemCountDAO
tri.close();
return tr.getIntColumn("number");
return tr.getIntColumn("count");
}
catch (SQLException e)
{

View File

@@ -66,10 +66,10 @@ public class ItemCountDAOPostgres implements ItemCountDAO
private String collectionSelect = "SELECT * FROM collection_item_count WHERE collection_id = ?";
/** SQL to insert a new collection record */
private String collectionInsert = "INSERT INTO collection_item_count (collection_id, number) VALUES (?, ?)";
private String collectionInsert = "INSERT INTO collection_item_count (collection_id, count) VALUES (?, ?)";
/** SQL to update an existing collection record */
private String collectionUpdate = "UPDATE collection_item_count SET number = ? WHERE collection_id = ?";
private String collectionUpdate = "UPDATE collection_item_count SET count = ? WHERE collection_id = ?";
/** SQL to remove a collection record */
private String collectionRemove = "DELETE FROM collection_item_count WHERE collection_id = ?";
@@ -78,10 +78,10 @@ public class ItemCountDAOPostgres implements ItemCountDAO
private String communitySelect = "SELECT * FROM community_item_count WHERE community_id = ?";
/** SQL to insert a new community record */
private String communityInsert = "INSERT INTO community_item_count (community_id, number) VALUES (?, ?)";
private String communityInsert = "INSERT INTO community_item_count (community_id, count) VALUES (?, ?)";
/** SQL to update an existing community record */
private String communityUpdate = "UPDATE community_item_count SET number = ? WHERE community_id = ?";
private String communityUpdate = "UPDATE community_item_count SET count = ? WHERE community_id = ?";
/** SQL to remove a community record */
private String communityRemove = "DELETE FROM community_item_count WHERE community_id = ?";
@@ -287,7 +287,7 @@ public class ItemCountDAOPostgres implements ItemCountDAO
tri.close();
return tr.getIntColumn("number");
return tr.getIntColumn("count");
}
catch (SQLException e)
{
@@ -325,7 +325,7 @@ public class ItemCountDAOPostgres implements ItemCountDAO
tri.close();
return tr.getIntColumn("number");
return tr.getIntColumn("count");
}
catch (SQLException e)
{

View File

@@ -742,12 +742,12 @@ WHERE ItemsBySubject.item_id = Communities2Item.item_id
CREATE TABLE collection_item_count (
collection_id INTEGER REFERENCES collection(collection_id),
number INTEGER
count INTEGER
);
CREATE TABLE community_item_count (
community_id INTEGER REFERENCES community(community_id),
number INTEGER
count INTEGER
);
-------------------------------------------------------