Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions SqlPipeline/SqlPipeline/Public/duckdb/Show-DuckDBConnection.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
function Show-DuckDBConnections {
<#
.SYNOPSIS
Displays the current DuckDB connections managed by SqlPipeline.
.DESCRIPTION
Shows the in-memory connection and the active default connection, including
their connection strings and current state.
.EXAMPLE
Show-DuckDBConnections
#>
[CmdletBinding()]
param()

[PSCustomObject]@{
Name = 'InMemory'
ConnectionString = if ($null -ne $Script:InMemoryConnection) { $Script:InMemoryConnection.ConnectionString } else { $null }
State = if ($null -ne $Script:InMemoryConnection) { $Script:InMemoryConnection.State } else { 'Not initialized' }
IsDefault = [object]::ReferenceEquals($Script:DefaultConnection, $Script:InMemoryConnection)
}

if ($null -ne $Script:DefaultConnection -and -not [object]::ReferenceEquals($Script:DefaultConnection, $Script:InMemoryConnection)) {
[PSCustomObject]@{
Name = 'Default (file-based)'
ConnectionString = $Script:DefaultConnection.ConnectionString
State = $Script:DefaultConnection.State
IsDefault = $true
}
}

}
5 changes: 4 additions & 1 deletion SqlPipeline/SqlPipeline/SqlPipeline.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
RootModule = 'SqlPipeline.psm1'

# Die Versionsnummer dieses Moduls
ModuleVersion = '0.3.4'
ModuleVersion = '0.3.5'

# Unterstützte PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -82,9 +82,11 @@ FunctionsToExport = @(
"Invoke-DuckDBQuery"
"Set-LoadMetadata"
"Export-DuckDBToParquet"
"Show-DuckDBConnection"

# General
"Install-SqlPipeline"

)

# Aus diesem Modul zu exportierende Cmdlets. Um optimale Leistung zu erzielen, verwenden Sie keine Platzhalter und löschen den Eintrag nicht. Verwenden Sie ein leeres Array, wenn keine zu exportierenden Cmdlets vorhanden sind.
Expand Down Expand Up @@ -124,6 +126,7 @@ PrivateData = @{

# 'ReleaseNotes' des Moduls
ReleaseNotes = '
0.3.5 Added function to show open DuckDB connections: Show-DuckDBConnection
0.3.4 Fixing package installation with PowerShell 5.1 because Expand-Archive only supports *.zip files
0.3.3 Extending Install-SqlPipeline to install DuckDB.net 1.4.4 when using PowerShell 5.1 (latest supported version), pwsh is supporting all latest versions
Fixing to not cancel the module import if SimplySQL does not match the current processor architecture
Expand Down