ConvertTo Schema - Ackara/Daterpillar GitHub Wiki

ConvertTo-Schema

SYNOPSIS

This cmdlet instantiates a new [Acklann.Daterpillar.Schema] object from the specified 'InputObject'.

SYNTAX

Set 1

ConvertTo-Schema [[-InputObject] <Object>] [<CommonParameters>]

DESCRIPTION

Initializes a new [Acklann.Daterpillar.Schema] instance using a specified file or [System.Data.IDBConnection] object.

EXAMPLES

EXAMPLE 1

C:\PS> Get-Item "C:\projects\helloworld\bin\Debug\helloworld.schema.xml" | ConvertTo-Schema;

This example, creates a new [Acklann.Daterpillar.Schema] object using a 'schema.xml' file.

EXAMPLE 2

C:\PS> $schema = ConvertTo-Schema (New-Object System.Data.SqlClient.SqlConnection($connectionString));

This example creates [Acklann.Daterpillar.Schema] object by passing a [System.Data.IDbConnection] object.

PARAMETERS

InputObject

The file or [System.Data.IDbConnection] object.

Type: Object
Parameter Sets: Set 1
Aliases: in , input , path , connection , conn

Required: false
Position: 1
Default Value: 
Pipeline Input: True (ByValue)

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

System.IO.FileInfo

System.String

System.Data.IDbConnection

OUTPUTS

Acklann.Daterpillar.Schema

NOTES

Accepted inputs

This cmdlet will accept a (mysql, mssql or sqlite) [System.Data.IDbConnection] object or a path to a serialized [Acklann.Daterpillar.Schema] object. When [System.Data.IDbConnection] is passed the cmdlet will open a connection to the server and read the 'Information schema' tables to generate a [Acklann.Daterpillar.Schema] object.

RELATED LINKS

Online Version:

Generated by: PowerShell HelpWriter 2017 v2.1.34

⚠️ **GitHub.com Fallback** ⚠️