Package dev.frostlake.functions.scalar.file


package dev.frostlake.functions.scalar.file
  • Class
    Description
    The two lookup tables behind the FILE family, both measured against a live Snowflake account on rather than inferred from the function names.
    Builds and validates the file-metadata object that IS a FILE value.
    Shared argument handling for the fourteen FL_* accessors, mirroring the family-local helper pattern of VectorFunctionHelper.
    FL_GET_CONTENT_TYPE(file) — the file's MIME content type.
    FL_GET_ETAG(file) — the staged file's entity tag.
    FL_GET_FILE_TYPE(file) — the file's single category name: image, video, audio, document, compressed or unknown.
    FL_GET_LAST_MODIFIED(file) — when the staged file was last modified.
    FL_GET_RELATIVE_PATH(file) — the file's path within its stage.
    FL_GET_SCOPED_FILE_URL(file) — the descriptor's SCOPED_FILE_URL field.
    FL_GET_SIZE(file) — the file's size in bytes.
    FL_GET_STAGE(file) — the stage the file lives on.
    FL_GET_STAGE_FILE_URL(file) — the descriptor's STAGE_FILE_URL field.
    FL_IS_AUDIO(file) — whether the file's CONTENT_TYPE is one of the audio types.
    FL_IS_COMPRESSED(file) — whether the file's CONTENT_TYPE is one of the archive types.
    FL_IS_DOCUMENT(file) — whether the file's CONTENT_TYPE is one of the document types.
    FL_IS_IMAGE(file) — whether the file's CONTENT_TYPE is one of the image types.
    FL_IS_VIDEO(file) — whether the file's CONTENT_TYPE is one of the video types.
    A stage reference resolved to a concrete file: where it lives on disk, plus the two descriptor fields that identify it inside its stage.
    Callback TO_FILE uses to turn a stage reference such as @stage/dir/file.txt into the file it names — the seam that lets the FILE functions read real stage metadata without depending on the executor class itself.
    TO_FILE(stage_and_path) / TO_FILE(stage, relative_path) / TO_FILE(metadata) — builds the file-metadata object that is a FILE value.
    TRY_TO_FILE(...) — ToFile with every failure turned into NULL.