Ivet.Model 1.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Ivet.Model --version 1.1.1                
NuGet\Install-Package Ivet.Model -Version 1.1.1                
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="Ivet.Model" Version="1.1.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ivet.Model --version 1.1.1                
#r "nuget: Ivet.Model, 1.1.1"                
#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 Ivet.Model as a Cake Addin
#addin nuget:?package=Ivet.Model&version=1.1.1

// Install Ivet.Model as a Cake Tool
#tool nuget:?package=Ivet.Model&version=1.1.1                

Summary

Ivet is a command line tool created to generate a schema for a janusgraph database and apply this schema. It has been inspired from Doctrine behaviour. The generate command creates a json file containing commands to execute. The file can be manually modified if you find migration is not complete or does not cover all you deserves. To keep trace of all applied migrations, migration names are saved into janusgraph server when upgrade is called. You can check at any moment the list of migrations both applied and not.

A test command is used to populate database either for personnal tests or unit tests. Do not use it in your production environment.

Available commands

  • generate
    • dir* Dlls to analyze
    • output* Directory where to put migration file
    • ip localhost
    • port 8182
  • list Display list of all migrations
    • input* Directory where to find migration files
    • ip localhost
    • port 8182
  • upgrade
    • input* Can be a file or a directory containing migrations to be applied
    • ip localhost
    • port 8182
  • test* Must not be used in Prod. This command is only used to apply a schema to a Janusgraph server
    • ip localhost
    • port 8182

Docker image

Docker image is available there:

To use Docker image, run the following command replacing MyDir with your local dierctory

docker run -v MyDir:/app/Migrations -e ip=localhost ivet

See upgrade command to add your own parameters.

Dotnet Tool

You can install Ivet as a dotnet tool

dotnet tool install --global Ivet

All versions are available on https://www.nuget.org/packages/Ivet

After the package is installed you can use it like

Ivet list --input "C:\MigrationFiles"

How to tag code?

Add Ivet.Model to your project. You are now ready to tag your code. All names and possibilities are listed in Janusgraph documentation at https://docs.janusgraph.org/schema/.

Tag a Vertex:

[Vertex]
public class MyVertex
{
    [PropertyKey]
    [PrimaryKey()]
    public string Id { get; set; }

    [PropertyKey(Name="NewName", Cardinality=Cardinality.SINGLE)]
    public string ANamedProperty { get; set; }

    [EdgeProperty]
    public List<Vertex3> AListProperty { get; private set; } = new List<Vertex3>();

    [EdgeProperty]
    public Vertex3[] AnArrayProperty { get; private set; } = Array.Empty<Vertex3>(); 
}

You can also specify a different name or a cardinality (details at https://docs.janusgraph.org/schema/#property-key-cardinality):

[PropertyKey(Name="NewName", Cardinality=Cardinality.SINGLE)]
public string ANamedProperty { get; set; }

Tag an Edge:

[Edge(typeof(MyVertex1), typeof(MyVertex2))]
public class EdgeWithProperties
{
    [PropertyKey]
    public int AProperty { get; set; }
}

You can also tag a property to be used with an index (https://docs.janusgraph.org/schema/index-management/index-performance/):

[Vertex]
public class MyVertex
{
    [PropertyKey]
    [CompositeIndex("unicity_index", IsUnique = true)] // Set unicity of the data
    public string ACompositeIndexProperty { get; set; }

    [PropertyKey]
    [MixedIndex("vertex2_mixed", Backend = "search", Mapping = MappingType.TEXTSTRING)]
    public string SearchProperty { get; set; }
}
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.
  • net6.0

    • No dependencies.

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
1.3.0 118 4/24/2024
1.2.0 140 3/10/2024
1.1.1 136 3/4/2024
1.1.0 122 3/3/2024