Database Function Description of "count_subalbums_by_album"

Name

count_subalbums_by_album

Description

Count the number of sub-albums in a particular album.

Purpose

To retrieve the number of sub-albums in a particular album.

Schema

CREATE FUNCTION count_subalbums_by_album(integer, integer, varchar[]) returns bigint AS '
select count(identifier) from album where parent_album = $1 and can_access_album(identifier, $2, $3);
' LANGUAGE 'sql';

Related tables

History

Used first

Version 2.29

Used last

Still in use

Change history

= Version 2.29 =

CREATE FUNCTION count_subalbums_by_album(integer) returns bigint
AS 'select count(identifier) from album where parent_album = $1' LANGUAGE 'sql';
CREATE FUNCTION count_subalbums_by_album(integer, integer) returns bigint
AS 'select count(identifier) from album where parent_album = $1 and access_rights <= $2' LANGUAGE 'sql';

= Version 2.34 =

DROP FUNCTION count_subalbums_by_album(integer);
DROP FUNCTION count_subalbums_by_album(integer, integer);
 
CREATE OR REPLACE FUNCTION count_subalbums_by_album(integer, integer, varchar[]) returns bigint AS '
select count(identifier) from album where parent_album = $1 and can_access_album(identifier, $2, $3);
' LANGUAGE 'sql';
podoc/count_subalbums_by_album_sql_function.txt · Last modified: 2007/10/19 16:29 by Luud
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0