[CS-XMLDatastore-commits] SF.net SVN: cs-xmldatastore:[4] trunk/0.1
Status: Alpha
Brought to you by:
crazedsanity
From: <cs-...@li...> - 2009-09-09 19:36:39
|
Revision: 4 http://cs-xmldatastore.svn.sourceforge.net/cs-xmldatastore/?rev=4&view=rev Author: crazedsanity Date: 2009-09-09 19:36:32 +0000 (Wed, 09 Sep 2009) Log Message: ----------- Main class + updated schema filename to match supported database type. Added Paths: ----------- trunk/0.1/lib/cs_xmlDataStore.class.php trunk/0.1/setup/schema.pgsql.sql Removed Paths: ------------- trunk/0.1/setup/schema.sql Added: trunk/0.1/lib/cs_xmlDataStore.class.php =================================================================== --- trunk/0.1/lib/cs_xmlDataStore.class.php (rev 0) +++ trunk/0.1/lib/cs_xmlDataStore.class.php 2009-09-09 19:36:32 UTC (rev 4) @@ -0,0 +1,28 @@ +<?php +/* + * Created on Aug 28, 2009 + * + * SVN INFORMATION::: + * ------------------- + * Last Author::::::::: $Author$ + * Current Revision:::: $Revision$ + * Repository Location: $HeadURL$ + * Last Updated:::::::: $Date$ + */ + + +class cs_xmlDataStore { + + protected $db; + protected $reader; + protected $writer; + + + //------------------------------------------------------------------------- + public function __construct() { + }//end __construct() + //------------------------------------------------------------------------- + +} + +?> Property changes on: trunk/0.1/lib/cs_xmlDataStore.class.php ___________________________________________________________________ Added: svn:keywords + Id Author Revision HeadURL Date Copied: trunk/0.1/setup/schema.pgsql.sql (from rev 3, trunk/0.1/setup/schema.sql) =================================================================== --- trunk/0.1/setup/schema.pgsql.sql (rev 0) +++ trunk/0.1/setup/schema.pgsql.sql 2009-09-09 19:36:32 UTC (rev 4) @@ -0,0 +1,62 @@ + +-- +-- Any API call must have a key in this table to even possibly be valid. +-- +CREATE TABLE csxd_api_table ( + api_id serial NOT NULL PRIMARY KEY, + api_key varchar(40) NOT NULL UNIQUE, + is_active bool NOT NULL DEFAULT TRUE +); + + +-- +-- A "node" is a generic term for a server, daemon, program, or any system +-- through which an API call is made. Any program wishing to pull or push +-- data must have an entry here. +-- +CREATE TABLE csxd_node_table ( + node_id serial NOT NULL PRIMARY KEY, + api_id int NOT NULL REFERENCES csxd_api_table(api_id) +); + + +-- +-- List of stores where data items can be pushed to & pulled from. Any API call +-- is required to have a "store_key", which indicates which store data is being +-- pulled from or pushed into. When the store is full, no items can be added +-- until it is emptied (or the size is increased) +-- +CREATE TABLE csxd_store_table ( + store_id serial NOT NULL PRIMARY KEY, + api_id int NOT NULL REFERENCES csxd_api_table(api_id), + max_items int NOT NULL DEFAULT 10 -- setting to 1 means only one item can exist +); + + +-- +-- Links nodes to stores, indicating whether the given node can push or pull (or +-- both) for the given store. +-- +CREATE TABLE csxd_node_to_store_table ( + node_to_store_id int NOT NULL PRIMARY KEY, + node_id int NOT NULL REFERENCES csxd_node_table(node_id), + store_id int NOT NULL REFERENCES csxd_store_table(store_id), + can_pull bool NOT NULL DEFAULT FALSE, + can_push bool NOT NULL DEFAULT FALSE +); + + +-- +-- Where the actual data for a store is held in encrypted (and encoded) format. +-- The auth_data_hash option is for verifying that the data received matches +-- what was sent (after decoding). Supports md5 or SHA-1 hashes. +-- +CREATE TABLE csxd_store_item_table ( + store_item_id serial NOT NULL PRIMARY KEY, + store_id int NOT NULL REFERENCES csxd_store_table(store_id), + auth_data_hash text varchar(40), + creation timestamp NOT NULL DEFAULT NOW(), + last_update timestamp, + store_data text +); + Deleted: trunk/0.1/setup/schema.sql =================================================================== --- trunk/0.1/setup/schema.sql 2009-08-27 16:21:20 UTC (rev 3) +++ trunk/0.1/setup/schema.sql 2009-09-09 19:36:32 UTC (rev 4) @@ -1,62 +0,0 @@ - --- --- Any API call must have a key in this table to even possibly be valid. --- -CREATE TABLE csxd_api_table ( - api_id serial NOT NULL PRIMARY KEY, - api_key varchar(40) NOT NULL UNIQUE, - is_active bool NOT NULL DEFAULT TRUE -); - - --- --- A "node" is a generic term for a server, daemon, program, or any system --- through which an API call is made. Any program wishing to pull or push --- data must have an entry here. --- -CREATE TABLE csxd_node_table ( - node_id serial NOT NULL PRIMARY KEY, - api_id int NOT NULL REFERENCES csxd_api_table(api_id) -); - - --- --- List of stores where data items can be pushed to & pulled from. Any API call --- is required to have a "store_key", which indicates which store data is being --- pulled from or pushed into. When the store is full, no items can be added --- until it is emptied (or the size is increased) --- -CREATE TABLE csxd_store_table ( - store_id serial NOT NULL PRIMARY KEY, - api_id int NOT NULL REFERENCES csxd_api_table(api_id), - max_items int NOT NULL DEFAULT 10 -- setting to 1 means only one item can exist -); - - --- --- Links nodes to stores, indicating whether the given node can push or pull (or --- both) for the given store. --- -CREATE TABLE csxd_node_to_store_table ( - node_to_store_id int NOT NULL PRIMARY KEY, - node_id int NOT NULL REFERENCES csxd_node_table(node_id), - store_id int NOT NULL REFERENCES csxd_store_table(store_id), - can_pull bool NOT NULL DEFAULT FALSE, - can_push bool NOT NULL DEFAULT FALSE -); - - --- --- Where the actual data for a store is held in encrypted (and encoded) format. --- The auth_data_hash option is for verifying that the data received matches --- what was sent (after decoding). Supports md5 or SHA-1 hashes. --- -CREATE TABLE csxd_store_item_table ( - store_item_id serial NOT NULL PRIMARY KEY, - store_id int NOT NULL REFERENCES csxd_store_table(store_id), - auth_data_hash text varchar(40), - creation timestamp NOT NULL DEFAULT NOW(), - last_update timestamp, - store_data text -); - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |