User Tools

Site Tools


podoc:count_photos_sql_function

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
podoc:count_photos_sql_function [2007/04/12 16:12] Luudpodoc:count_photos_sql_function [2007/04/23 14:26] (current) Luud
Line 1: Line 1:
-===== Database Sequence Description of "count_photos" =====+===== Database Function Description of "count_photos" =====
  
 === Name === === Name ===
Line 6: Line 6:
  
 === Description === === Description ===
 +
 +Count the total number of photos.
 +
 +There are two versions, one that counts all photos and one that counts only those photos up to a given access rights setting.
  
 === Purpose === === Purpose ===
 +
 +To retrieve the total number of photos.
  
 === Schema === === Schema ===
  
-  create function count_photos(integer) returns bigint +<code sql> 
-  as 'select count(identifier) from photo' language 'sql';+create function count_photos() returns bigint 
 +as 'select count(identifier) from photo' language 'sql'; 
 +</code>
  
-  create function count_photos(integer) returns bigint +<code sql> 
-  as 'select count(identifier) from photo where access_rights <= $1' language 'sql';+create function count_photos(integer) returns bigint 
 +as 'select count(identifier) from photo where access_rights <= $1' language 'sql'; 
 +</code>
  
 === Related tables === === Related tables ===
  
-=== Related indexes === +  * [[photo sql table|photo]]
- +
-=== Related functions === +
- +
-=== Related views ===+
  
 === History === === History ===
Line 39: Line 45:
 = Version 2.5 = = Version 2.5 =
  
-  create function count_photos(integer) returns bigint +<code sql> 
-  as 'select count(identifier) from photo' language 'sql';+create function count_photos() returns bigint 
 +as 'select count(identifier) from photo' language 'sql'; 
 +</code>
  
-  create function count_photos(integer) returns bigint +<code sql> 
-  as 'select count(identifier) from photo where access_rights <= $1' language 'sql';+create function count_photos(integer) returns bigint 
 +as 'select count(identifier) from photo where access_rights <= $1' language 'sql'; 
 +</code>
  
podoc/count_photos_sql_function.1176394324.txt.gz · Last modified: 2007/04/12 16:12 by Luud