.requirements/PSNeo4j/0.0.31/Public/New-Neo4jStatements.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
function New-Neo4jStatements { <# .SYNOPSIS Generate a 'Statements' block from the specified statements .DESCRIPTION Generate a 'Statements' block from the specified statements Generally only useful and used in PSNeo4j commands Details: http://neo4j.com/docs/developer-manual/current/http-api/ .EXAMPLE @{Statement = 'SOME CYPHER QUERY'} | New-Neo4jStatements .PARAMETER Statements One or more statements to add. Typically this will be either: @{Statement = 'SOME CYPHER QUERY'} @{ Statement = 'SOME CYPHER QUERY WITH $Some PARAMETERS' Parameters = @{ Some='Parameters' } } .FUNCTIONALITY Neo4j #> [cmdletbinding()] param( [parameter(ValueFromPipeline=$True)] [object[]]$Statements ) begin { $s = [System.Collections.ArrayList]@() } process { foreach($Statement in $Statements) { [void]$s.add($Statement) } } end { [pscustomobject]@{ statements = $s } } } |