external help file | Module Name | online version | schema |
---|---|---|---|
mySQLite-help.xml |
mySQLite |
2.0.0 |
Convert a MySQLite property blob
Convert-MySQLiteByteArray [-BlobProperty] <Byte[]> [<CommonParameters>]
Nested object properties are stored as blobs. When you specify such a property using ConvertTo-MySQLiteDB, it is exported using Export-Clixml. The content of the resulting text file is converted to a byte array which is stored in the database table. ConvertFrom-MySQLiteDB should automatically convert it back to a deserialized version of the original object. You can use this stand-alone function to handle the conversion yourself.
PS C:\> Invoke-MySQLiteQuery -path D:\temp\myproc.db -Query "Select name,id,ws,totalprocessortime from process where id=6624" | Select-Object name,id,ws,@{Name="TotalCPU";Expression = {Convert-MySQLiteByteArray $_.totalprocessortime}}
Name ID WS TotalCPU
---- -- -- --------
sqlservr 6624 778153984 00:00:58.0468750
The TotalProcessTime property will be returned as a byte array. Convert-MySQLiteByteArray restores it to its original form.
Specify the byte array from the blob property.
Type: Byte[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/