Comparing version 0.0.8 to 0.0.9
@@ -29,2 +29,12 @@ import { Packer, Encoder } from "./serializer" | ||
} | ||
@inline @operator('==') | ||
static eq(a: Float128, b: Float128): bool { | ||
return a.data[0] == b.data[0] && a.data[1] == b.data[1]; | ||
} | ||
@inline @operator('!=') | ||
static ne(a: Float128, b: Float128): bool { | ||
return !(a.data[0] == b.data[0] && a.data[1] == b.data[1]); | ||
} | ||
} |
@@ -39,2 +39,12 @@ import { IDXDB, SecondaryValue, SecondaryIterator } from "./idxdb"; | ||
upsert(value: T, payer: Name): PrimaryIterator { | ||
let it = this.find(value.getPrimaryValue()); | ||
if (it.isOk()) { | ||
this.update(it, value, payer); | ||
} else { | ||
it = this.store(value, payer); | ||
} | ||
return it | ||
} | ||
store(value: T, payer: Name): PrimaryIterator { | ||
@@ -41,0 +51,0 @@ const it = this.db.store(value.getPrimaryValue(), value.pack(), payer.N); |
{ | ||
"name": "as-chain", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "chain module for assemblyscript", | ||
@@ -5,0 +5,0 @@ "main": "js/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122775
3249