Research weight computations

* Added game.research.weightBase constant

* Added view which computes the weights for each in-progress research

* Added view which computes total weights per empire
This commit is contained in:
Emmanuel BENOîT 2012-03-01 12:42:05 +01:00
parent c9d8a077bd
commit a14601df37
8 changed files with 150 additions and 1 deletions
legacyworlds-server-data/db-structure/tests/user/040-functions/045-empire-research

View file

@ -0,0 +1,15 @@
/*
* Test privileges on emp.research_weights_view
*/
BEGIN;
\i utils/strings.sql
SELECT plan( 1 );
SELECT diag_test_name( 'emp.research_weights_view - No SELECT privilege' );
SELECT throws_ok( $$
SELECT * FROM emp.research_weights_view;
$$ , 42501 );
SELECT * FROM finish( );
ROLLBACK;

View file

@ -0,0 +1,15 @@
/*
* Test privileges on emp.research_total_weights_view
*/
BEGIN;
\i utils/strings.sql
SELECT plan( 1 );
SELECT diag_test_name( 'emp.research_total_weights_view - No SELECT privilege' );
SELECT throws_ok( $$
SELECT * FROM emp.research_total_weights_view;
$$ , 42501 );
SELECT * FROM finish( );
ROLLBACK;