Functions/GenXdev.Data.SqlLite/Get-SqlLiteTables.ps1

#######################################################################################

function Get-SqlLiteTables {

    [CmdletBinding(DefaultParameterSetName = "Default")]

    param (

        ###############################################################################

        [Parameter(
            Position = 0,
            Mandatory,
            ParameterSetName = 'ConnectionString',
            HelpMessage = 'The connection string to the SQLite database.'
        )]
        [string]$ConnectionString,

        ###############################################################################

        [Parameter(
            Position = 0,
            Mandatory,
            ParameterSetName = 'DatabaseFilePath',
            HelpMessage = 'The path to the SQLite database file.'
        )]
        [string]$DatabaseFilePath
    )

    $PSBoundParameters["Queries"] = "SELECT name FROM sqlite_master WHERE type='table'"

    Invoke-SqlLiteQuery @PSBoundParameters
}