metarhia/metasql

DDL: attribute metadata { set, get }

tshemsedinov opened this issue · 0 comments

({
  price: {
    type: 'number',
    set(value) {
      this.value = typeof value === 'number' ? value : parseInt(value, 10);
    }
    get() {
      return Math.round(this.value);
    }
  },
});