AnyQl 1.0.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package AnyQl --version 1.0.0
NuGet\Install-Package AnyQl -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AnyQl" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AnyQl --version 1.0.0
#r "nuget: AnyQl, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AnyQl as a Cake Addin
#addin nuget:?package=AnyQl&version=1.0.0

// Install AnyQl as a Cake Tool
#tool nuget:?package=AnyQl&version=1.0.0

AnyQl

C# library for extracting fields from strings in formats such as json and generating sql INSERT or UPDATE strings from them.
Curently only supported file formats are Json and Xml.

This project is in development and probably contains some bugs, if you find some, it would be nice if you would create an issue about it!

Example Usage

using AnyQl;

//sample json string that could be response from an api with cooking recepies
//please do not use this as real cooking recepie, as I just made it up and it probably won't really work
string Json = @"{
    'count':1,
    'items':[
        {
            'recepie_name':'potatoe chips',
            'ingredients':['potatoes','salt'],
            'cooking_process':'wash your potatoes, cut them to small slices, put bit of salt on them and put them to oven for 30 minutes at 200°C'
        }
    ]
}";
//sample insert string with implicit column names
string? sampleInsert = SqlGenerator.Generate(Json, new string[] { "items[0].recepie_name", "items[0].cooking_process" }, "MyRecepies", FileFormat.Json, SqlStatementType.INSERT);

//sample update string with explicit column names
string? sampleUpdate = SqlGenerator.Generate(Json, new string[] { "items[0].recepie_name", "items[0].cooking_process" }, new string[] { "NameOfRecepie", "process" }, "MyRecepies", FileFormat.Json, SqlStatementType.UPDATE);

Console.WriteLine(sampleInsert);
Console.WriteLine(sampleUpdate);

output of this code is

INSERT INTO MyRecepies(recepie_name, cooking_process) VALUES('potatoe chips', 'wash your potatoes, cut them to small slices, put bit of salt on them and put them to oven for 30 minutes at 200°C')
UPDATE MyRecepies SET NameOfRecepie='potatoe chips', process='wash your potatoes, cut them to small slices, put bit of salt on them and put them to oven for 30 minutes at 200°C'
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated

first release