podoc:count_photos_by_folder_sql_function
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
podoc:count_photos_by_folder_sql_function [2007/04/12 12:27] – Luud | podoc:count_photos_by_folder_sql_function [2007/10/19 20:27] (current) – Luud | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Database Function Description ===== | + | ===== Database Function Description |
=== Name === | === Name === | ||
+ | |||
+ | count_photos_by_folder | ||
=== Description === | === Description === | ||
+ | |||
+ | Count the photos in a particular folder. | ||
=== Purpose === | === Purpose === | ||
+ | |||
+ | To retrieve the number of photos in a particular folder. | ||
=== Schema === | === Schema === | ||
+ | |||
+ | <code sql> | ||
+ | create function count_photos_by_folder(integer, | ||
+ | select count(identifier) from photo where folder = $1 and can_access_photo(identifier, | ||
+ | ' language ' | ||
+ | </ | ||
=== Related tables === | === Related tables === | ||
- | === Related views === | + | * [[photo sql table|photo]] |
- | + | ||
- | === Related sequences === | + | |
- | + | ||
- | === Related indexes === | + | |
=== History === | === History === | ||
Line 31: | Line 39: | ||
= Version 2.5 = | = Version 2.5 = | ||
- | | + | <code sql> |
- | ... | + | create function |
- | ); | + | as ' |
+ | </ | ||
+ | |||
+ | <code sql> | ||
+ | create function count_photos_by_folder(integer, | ||
+ | as ' | ||
+ | </ | ||
+ | |||
+ | = Version 2.34 = | ||
+ | |||
+ | <code sql> | ||
+ | drop function count_photos_by_folder(integer); | ||
+ | drop function count_photos_by_folder(integer, | ||
+ | |||
+ | create or replace function count_photos_by_folder(integer, | ||
+ | select count(identifier) from photo where folder = $1 and can_access_photo(identifier, | ||
+ | ' language ' | ||
+ | </ |
podoc/count_photos_by_folder_sql_function.1176380862.txt.gz · Last modified: 2007/04/12 12:27 by Luud