pears.BlobstoreExtFolder

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

CREATE FUNCTION "pears"."BlobstoreExtFolder"( 
  /* Application Maintained Function / Procedure - DO NOT EDIT*/
  IN "blobdate" DATE ) 
RETURNS CHAR(250)
NOT deterministic
BEGIN
  DECLARE "rv" CHAR(250);
  DECLARE "b" tinyint;
  DECLARE "sep" CHAR(1);
  SELECT FIRST "blobexternalstorage","trim"("blobexternalrootfolder") INTO "b","rv" FROM "params";
  IF "isnull"("b",0) = 0 OR "isnull"("rv",'') = '' THEN
    RETURN NULL
  END IF;
  SET "sep" = "right"("BlobstoreDBFolder"(),1); -- slash or backslash
  IF "right"("rv",1) <> "sep" THEN
    SET "rv" = "rv"+"sep"
  END IF;
  SET "rv" = "rv"+"dateformat"("isnull"("blobdate",CURRENT DATE),'yyyy'+"sep"+'mm-dd'+"sep");
  RETURN "rv"
END
  • database/functions/pears_blobstoreextfolder.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1