Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Dimitrie/dev/localdb sqlite #90

Merged
merged 32 commits into from
Nov 28, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4910ab1
base-not working
didimitrie Oct 29, 2018
76e6e39
scafolding up sqlite db access
didimitrie Oct 29, 2018
eb77324
migrating accounts & general scaffolding
didimitrie Oct 29, 2018
9f0d495
csproj includes fixed
didimitrie Oct 29, 2018
dbbfa9f
added remove account routine
didimitrie Oct 29, 2018
aff70d9
adds get and add routines for cached objects in the local context
didimitrie Oct 30, 2018
bc02789
added CachedStreams & added on date for objects
didimitrie Oct 31, 2018
d946347
code doc + get stream from cache
didimitrie Oct 31, 2018
36a1759
added prune existing objects routine
didimitrie Oct 31, 2018
6fce630
add api check on prune objects
didimitrie Nov 1, 2018
16f7a69
this should take care of setting default accounts
didimitrie Nov 1, 2018
f429069
this should take care of setting default accounts *properly*
didimitrie Nov 1, 2018
bc12da4
adding second try for assembly check based only on short name re abst…
didimitrie Nov 2, 2018
e63eb20
fixed bug if no specklesettings folder exists
teocomi Nov 3, 2018
06ba455
Merge pull request #88 from speckleworks/Matteo/db-fix
didimitrie Nov 3, 2018
50c1599
implementing speckle object equality comparer
didimitrie Nov 3, 2018
10da06a
fixed migration logic when same file already exists
teocomi Nov 5, 2018
de75507
Merge branch 'Dimitrie/dev/localdb-sqlite' into Matteo/db-fix
teocomi Nov 5, 2018
0ba6b37
Merge pull request #89 from speckleworks/Matteo/db-fix
teocomi Nov 5, 2018
fd4ac14
modifies local context with separate table & methods for "sent" objec…
didimitrie Nov 13, 2018
3f42329
renamed some functions for clarity & added purging methods
didimitrie Nov 13, 2018
3f70c1d
finally fixes #75 (no more secret token serialisation inside clients)
didimitrie Nov 13, 2018
35d4a1c
made speckle base color inherit from speckle object
didimitrie Nov 15, 2018
b775345
added step property to speckleinput
didimitrie Nov 18, 2018
8a08cf7
clients now get really deleted when dispose(true) is called
didimitrie Nov 20, 2018
8caf649
fixes max_sql_vars error in prune local objects
didimitrie Nov 22, 2018
bf1908c
switched to 4.5
teocomi Nov 22, 2018
ab6eb66
Merge branch 'Dimitrie/dev/localdb-sqlite' of https://github.com/spec…
teocomi Nov 22, 2018
c861912
fixed cache misses
didimitrie Nov 22, 2018
1f1549c
Merge branch 'Dimitrie/dev/localdb-sqlite' of https://github.com/spec…
didimitrie Nov 22, 2018
9b4c628
makes sure db is init on all methods & adds updates w/h new ws methods
didimitrie Nov 23, 2018
a901745
thiccc stakkk overflow fix
didimitrie Nov 23, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added step property to speckleinput
  • Loading branch information
didimitrie committed Nov 18, 2018
commit b7753458e058160915fd85e17b159b88d1b4766b
33 changes: 18 additions & 15 deletions SpeckleCore/Models/ModelObjectsExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
namespace SpeckleCore
{

public class SpeckleObjectComparer : IEqualityComparer<SpeckleObject>
public class SpeckleObjectComparer : IEqualityComparer<SpeckleObject>
{
public bool Equals( SpeckleObject x, SpeckleObject y )
{
public bool Equals( SpeckleObject x, SpeckleObject y )
{
return x.Hash == y.Hash;
}
return x.Hash == y.Hash;
}

public int GetHashCode( SpeckleObject obj )
{
return obj.Hash.GetHashCode();
}
public int GetHashCode( SpeckleObject obj )
{
return obj.Hash.GetHashCode();
}
}

public partial class SpeckleObject
public partial class SpeckleObject
{
/// <summary>
/// Generates a truncated (to 12) md5 hash of an object.
Expand Down Expand Up @@ -545,8 +545,8 @@ public override void Scale( double factor )
public override void GenerateHash( )
{
base.GenerateHash();
this.GeometryHash += GetMd5FromObject( BasePlane.GeometryHash + XSize.GeometryHash + YSize.GeometryHash + ZSize.GeometryHash );
this.Hash = GetMd5FromObject( this.GeometryHash + GetMd5FromObject( this.Properties ) );
this.GeometryHash += GetMd5FromObject( BasePlane.ToJson() + XSize.ToJson() + YSize.ToJson() + ZSize.ToJson() );
this.Hash = GetMd5FromObject( this );
}

}
Expand Down Expand Up @@ -857,16 +857,19 @@ public partial class SpeckleInput : SpeckleObject
public string Guid { get; set; }

[Newtonsoft.Json.JsonProperty( "value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
public float Value { get; set; }
public double Value { get; set; }

[Newtonsoft.Json.JsonProperty( "inputType", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
public string InputType { get; set; }

[Newtonsoft.Json.JsonProperty( "max", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
public float Max { get; set; }
public double Max { get; set; }

[Newtonsoft.Json.JsonProperty( "min", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
public float Min { get; set; }
public double Min { get; set; }

[Newtonsoft.Json.JsonProperty( "step", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
public double Step { get; set; }

public SpeckleInput( string name, float min, float max, float value, string inputType, string guid )
{
Expand Down
2 changes: 1 addition & 1 deletion SpeckleCore/Models/ModelResponses.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public static Resource FromJson( string data )

[System.CodeDom.Compiler.GeneratedCode( "NJsonSchema", "9.10.41.0 (Newtonsoft.Json v9.0.0.0)" )]
[Serializable]
public partial class SpeckleBaseColor : SpeckleObject
public partial class SpeckleBaseColor
{
/// <summary>alpha value</summary>
[Newtonsoft.Json.JsonProperty( "a", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
Expand Down