Repository: genjidb/genji
Pull request #134 (2020-07-19 14:35:55)

Update documentation theme
This PR updates the documentation theme submodule


Patch:
diff --git a/database/config.go b/database/config.go
index bd3c561e..12d6d7ab 100644
--- a/database/config.go
+++ b/database/config.go
@@ -25,7 +25,7 @@ func (f *FieldConstraint) ToDocument() document.Document {
 	buf := document.NewFieldBuffer()
 
 	buf.Add("path", document.NewArrayValue(valuePathToArray(f.Path)))
-	buf.Add("type", document.NewIntValue(int(f.Type)))
+	buf.Add("type", document.NewIntegerValue(int64(f.Type)))
 	buf.Add("is_primary_key", document.NewBoolValue(f.IsPrimaryKey))
 	buf.Add("is_not_null", document.NewBoolValue(f.IsNotNull))
 	return buf
diff --git a/docs/themes/docsy b/docs/themes/docsy
index 053672c2..02904c33 160000
--- a/docs/themes/docsy
+++ b/docs/themes/docsy
@@ -1,1 +1,1 @@
-Subproject commit 053672c24cf51417c300f8ea5d32db545340746d
+Subproject commit 02904c33475a4a9e21104bff901f8c6f821fd597
diff --git a/docs/yarn.lock b/docs/yarn.lock
index 4dba88aa..013d1c89 100644
--- a/docs/yarn.lock
+++ b/docs/yarn.lock
@@ -15,11 +15,6 @@
   resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
   integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==
 
-abbrev@1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
-  integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
-
 ansi-regex@^2.0.0:
   version "2.1.1"
   resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
@@ -45,19 +40,6 @@ anymatch@^2.0.0:
     micromatch "^3.1.4"
     normalize-path "^2.1.1"
 
-aproba@^1.0.3:
-  version "1.2.0"
-  resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
-  integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==
-
-are-we-there-yet@~1.1.2:
-  version "1.1.5"
-  resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21"
-  integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==
-  dependencies:
-    delegates "^1.0.0"
-    readable-stream "^2.0.6"
-
 argparse@^1.0.7:
   version "1.0.10"
   resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
@@ -252,11 +234,6 @@ chokidar@^2.0.0:
   optionalDependencies:
     fsevents "^1.2.7"
 
-chownr@^1.1.1:
-  version "1.1.4"
-  resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
-  integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==
-
 class-utils@^0.3.5:
   version "0.3.6"
   resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
@@ -311,11 +288,6 @@ concat-map@0.0.1:
   resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
   integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
 
-console-control-strings@^1.0.0, console-control-strings@~1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
-  integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=
-
 copy-descriptor@^0.1.0:
   version "0.1.1"
   resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
@@ -357,13 +329,6 @@ debug@^2.2.0, debug@^2.3.3:
   dependencies:
     ms "2.0.0"
 
-debug@^3.2.6:
-  version "3.2.6"
-  resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
-  integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==
-  dependencies:
-    ms "^2.1.1"
-
 decamelize@^1.1.1:
   version "1.2.0"
   resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
@@ -374,11 +339,6 @@ decode-uri-component@^0.2.0:
   resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
   integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
 
-deep-extend@^0.6.0:
-  version "0.6.0"
-  resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
-  integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==
-
 define-property@^0.2.5:
   version "0.2.5"
   resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116"
@@ -401,21 +361,11 @@ define-property@^2.0.2:
     is-descriptor "^1.0.2"
     isobject "^3.0.1"
 
-delegates@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
-  integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=
-
 dependency-graph@^0.7.0:
   version "0.7.2"
   resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.7.2.tgz#91db9de6eb72699209d88aea4c1fd5221cac1c49"
   integrity sha512-KqtH4/EZdtdfWX0p6MGP9jljvxSY6msy/pRUD4jgNwVpv3v1QmNLlsB3LDSSUg79BRVSn7jI1QPRtArGABovAQ==
 
-detect-libc@^1.0.2:
-  version "1.0.3"
-  resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
-  integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=
-
 dir-glob@2.0.0:
   version "2.0.0"
   resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034"
@@ -570,13 +520,6 @@ fs-extra@^5.0.0:
     jsonfile "^4.0.0"
     universalify "^0.1.0"
 
-fs-minipass@^1.2.5:
-  version "1.2.7"
-  resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7"
-  integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==
-  dependencies:
-    minipass "^2.6.0"
-
 fs.realpath@^1.0.0:
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
@@ -590,20 +533,6 @@ fsevents@^1.2.7:
     bindings "^1.5.0"
     nan "^2.12.1"
 
-gauge@~2.7.3:
-  version "2.7.4"
-  resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
-  integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=
-  dependencies:
-    aproba "^1.0.3"
-    console-control-strings "^1.0.0"
-    has-unicode "^2.0.0"
-    object-assign "^4.1.0"
-    signal-exit "^3.0.0"
-    string-width "^1.0.1"
-    strip-ansi "^3.0.1"
-    wide-align "^1.1.0"
-
 get-caller-file@^1.0.1:
   version "1.0.3"
   resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a"
@@ -639,7 +568,7 @@ glob-to-regexp@^0.3.0:
   resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
   integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=
 
-glob@^7.1.2, glob@^7.1.3:
+glob@^7.1.2:
   version "7.1.6"
   resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
   integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
@@ -674,11 +603,6 @@ has-flag@^3.0.0:
   resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
   integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
 
-has-unicode@^2.0.0:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
-  integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=
-
 has-value@^0.3.1:
   version "0.3.1"
   resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f"
@@ -710,20 +634,6 @@ has-values@^1.0.0:
     is-number "^3.0.0"
     kind-of "^4.0.0"
 
-iconv-lite@^0.4.4:
-  version "0.4.24"
-  resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
-  integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
-  dependencies:
-    safer-buffer ">= 2.1.2 < 3"
-
-ignore-walk@^3.0.1:
-  version "3.0.3"
-  resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37"
-  integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==
-  dependencies:
-    minimatch "^3.0.4"
-
 ignore@^3.3.5:
   version "3.3.10"
   resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
@@ -742,11 +652,6 @@ inherits@2, inherits@^2.0.3, inherits@~2.0.3:
   resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
   integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
 
-ini@~1.3.0:
-  version "1.3.5"
-  resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
-  integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==
-
 invert-kv@^2.0.0:
   version "2.0.0"
   resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02"
@@ -972,9 +877,9 @@ locate-path@^3.0.0:
     path-exists "^3.0.0"
 
 lodash@^4.17.4:
-  version "4.17.15"
-  resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
-  integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
+  version "4.17.19"
+  resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
+  integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
 
 log-symbols@^2.0.0:
   version "2.2.0"
@@ -1047,26 +952,11 @@ minimatch@^3.0.4:
   dependencies:
     brace-expansion "^1.1.7"
 
-minimist@^1.2.0, minimist@^1.2.5:
+minimist@^1.2.0:
   version "1.2.5"
   resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
   integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
 
-minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0:
-  version "2.9.0"
-  resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6"
-  integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==
-  dependencies:
-    safe-buffer "^5.1.2"
-    yallist "^3.0.0"
-
-minizlib@^1.2.1:
-  version "1.3.3"
-  resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d"
-  integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==
-  dependencies:
-    minipass "^2.9.0"
-
 mixin-deep@^1.2.0:
   version "1.3.2"
   resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
@@ -1075,23 +965,11 @@ mixin-deep@^1.2.0:
     for-in "^1.0.2"
     is-extendable "^1.0.1"
 
-mkdirp@^0.5.0, mkdirp@^0.5.1:
-  version "0.5.4"
-  resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.4.tgz#fd01504a6797ec5c9be81ff43d204961ed64a512"
-  integrity sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==
-  dependencies:
-    minimist "^1.2.5"
-
 ms@2.0.0:
   version "2.0.0"
   resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
   integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
 
-ms@^2.1.1:
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
-  integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
-
 nan@^2.12.1:
   version "2.14.0"
   resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c"
@@ -1114,36 +992,11 @@ nanomatch@^1.2.9:
     snapdragon "^0.8.1"
     to-regex "^3.0.1"
 
-needle@^2.2.1:
-  version "2.3.3"
-  resolved "https://registry.yarnpkg.com/needle/-/needle-2.3.3.tgz#a041ad1d04a871b0ebb666f40baaf1fb47867117"
-  integrity sha512-EkY0GeSq87rWp1hoq/sH/wnTWgFVhYlnIkbJ0YJFfRgEFlz2RraCjBpFQ+vrEgEdp0ThfyHADmkChEhcb7PKyw==
-  dependencies:
-    debug "^3.2.6"
-    iconv-lite "^0.4.4"
-    sax "^1.2.4"
-
 nice-try@^1.0.4:
   version "1.0.5"
   resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
   integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
 
-node-pre-gyp@*:
-  version "0.14.0"
-  resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz#9a0596533b877289bcad4e143982ca3d904ddc83"
-  integrity sha512-+CvDC7ZttU/sSt9rFjix/P05iS43qHCOOGzcr3Ry99bXG7VX953+vFyEuph/tfqoYu8dttBkE86JSKBO2OzcxA==
-  dependencies:
-    detect-libc "^1.0.2"
-    mkdirp "^0.5.1"
-    needle "^2.2.1"
-    nopt "^4.0.1"
-    npm-packlist "^1.1.6"
-    npmlog "^4.0.2"
-    rc "^1.2.7"
-    rimraf "^2.6.1"
-    semver "^5.3.0"
-    tar "^4.4.2"
-
 node-releases@^1.1.52:
   version "1.1.52"
   resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.52.tgz#bcffee3e0a758e92e44ecfaecd0a47554b0bcba9"
@@ -1151,14 +1004,6 @@ node-releases@^1.1.52:
   dependencies:
     semver "^6.3.0"
 
-nopt@^4.0.1:
-  version "4.0.3"
-  resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48"
-  integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==
-  dependencies:
-    abbrev "1"
-    osenv "^0.1.4"
-
 normalize-path@^2.1.1:
   version "2.1.1"
   resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
@@ -1176,27 +1021,6 @@ normalize-range@^0.1.2:
   resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
   integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=
 
-npm-bundled@^1.0.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.1.tgz#1edd570865a94cdb1bc8220775e29466c9fb234b"
-  integrity sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==
-  dependencies:
-    npm-normalize-package-bin "^1.0.1"
-
-npm-normalize-package-bin@^1.0.1:
-  version "1.0.1"
-  resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2"
-  integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==
-
-npm-packlist@^1.1.6:
-  version "1.4.8"
-  resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.8.tgz#56ee6cc135b9f98ad3d51c1c95da22bbb9b2ef3e"
-  integrity sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==
-  dependencies:
-    ignore-walk "^3.0.1"
-    npm-bundled "^1.0.1"
-    npm-normalize-package-bin "^1.0.1"
-
 npm-run-path@^2.0.0:
   version "2.0.2"
   resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f"
@@ -1204,16 +1028,6 @@ npm-run-path@^2.0.0:
   dependencies:
     path-key "^2.0.0"
 
-npmlog@^4.0.2:
-  version "4.1.2"
-  resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b"
-  integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==
-  dependencies:
-    are-we-there-yet "~1.1.2"
-    console-control-strings "~1.1.0"
-    gauge "~2.7.3"
-    set-blocking "~2.0.0"
-
 num2fraction@^1.2.2:
   version "1.2.2"
   resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede"
@@ -1259,7 +1073,7 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0:
   dependencies:
     wrappy "1"
 
-os-homedir@^1.0.0, os-homedir@^1.0.1:
+os-homedir@^1.0.1:
   version "1.0.2"
   resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
   integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M=
@@ -1273,19 +1087,6 @@ os-locale@^3.1.0:
     lcid "^2.0.0"
     mem "^4.0.0"
 
-os-tmpdir@^1.0.0:
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
-  integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
-
-osenv@^0.1.4:
-  version "0.1.5"
-  resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410"
-  integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==
-  dependencies:
-    os-homedir "^1.0.0"
-    os-tmpdir "^1.0.0"
-
 p-defer@^1.0.0:
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c"
@@ -1495,16 +1296,6 @@ pump@^3.0.0:
     end-of-stream "^1.1.0"
     once "^1.3.1"
 
-rc@^1.2.7:
-  version "1.2.8"
-  resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed"
-  integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==
-  dependencies:
-    deep-extend "^0.6.0"
-    ini "~1.3.0"
-    minimist "^1.2.0"
-    strip-json-comments "~2.0.1"
-
 read-cache@^1.0.0:
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/read-cache/-/read-cache-1.0.0.tgz#e664ef31161166c9751cdbe8dbcf86b5fb58f774"
@@ -1512,7 +1303,7 @@ read-cache@^1.0.0:
   dependencies:
     pify "^2.3.0"
 
-readable-stream@^2.0.2, readable-stream@^2.0.6:
+readable-stream@^2.0.2:
   version "2.3.7"
   resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
   integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
@@ -1582,18 +1373,6 @@ ret@~0.1.10:
   resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
   integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==
 
-rimraf@^2.6.1:
-  version "2.7.1"
-  resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
-  integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==
-  dependencies:
-    glob "^7.1.3"
-
-safe-buffer@^5.1.2:
-  version "5.2.0"
-  resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
-  integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==
-
 safe-buffer@~5.1.0, safe-buffer@~5.1.1:
   version "5.1.2"
   resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
@@ -1606,17 +1385,7 @@ safe-regex@^1.1.0:
   dependencies:
     ret "~0.1.10"
 
-"safer-buffer@>= 2.1.2 < 3":
-  version "2.1.2"
-  resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
-  integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
-
-sax@^1.2.4:
-  version "1.2.4"
-  resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
-  integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
-
-semver@^5.3.0, semver@^5.5.0:
+semver@^5.5.0:
   version "5.7.1"
   resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
   integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
@@ -1626,7 +1395,7 @@ semver@^6.3.0:
   resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
   integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
 
-set-blocking@^2.0.0, set-blocking@~2.0.0:
+set-blocking@^2.0.0:
   version "2.0.0"
   resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
   integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
@@ -1748,7 +1517,7 @@ string-width@^1.0.1:
     is-fullwidth-code-point "^1.0.0"
     strip-ansi "^3.0.0"
 
-"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1:
+string-width@^2.0.0, string-width@^2.1.1:
   version "2.1.1"
   resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
   integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==
@@ -1782,11 +1551,6 @@ strip-eof@^1.0.0:
   resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf"
   integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=
 
-strip-json-comments@~2.0.1:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
-  integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
-
 supports-color@^5.3.0, supports-color@^5.4.0:
   version "5.5.0"
   resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
@@ -1801,19 +1565,6 @@ supports-color@^6.1.0:
   dependencies:
     has-flag "^3.0.0"
 
-tar@^4.4.2:
-  version "4.4.13"
-  resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525"
-  integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==
-  dependencies:
-    chownr "^1.1.1"
-    fs-minipass "^1.2.5"
-    minipass "^2.8.6"
-    minizlib "^1.2.1"
-    mkdirp "^0.5.0"
-    safe-buffer "^5.1.2"
-    yallist "^3.0.3"
-
 to-object-path@^0.3.0:
   version "0.3.0"
   resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
@@ -1894,13 +1645,6 @@ which@^1.2.9:
   dependencies:
     isexe "^2.0.0"
 
-wide-align@^1.1.0:
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457"
-  integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==
-  dependencies:
-    string-width "^1.0.2 || 2"
-
 wrap-ansi@^2.0.0:
   version "2.1.0"
   resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
@@ -1919,11 +1663,6 @@ y18n@^3.2.1:
   resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
   integrity sha1-bRX7qITAhnnA136I53WegR4H+kE=
 
-yallist@^3.0.0, yallist@^3.0.3:
-  version "3.1.1"
-  resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
-  integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==
-
 yargs-parser@^9.0.2:
   version "9.0.2"
   resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077"
diff --git a/document/array.go b/document/array.go
index e43e5fc6..48225a78 100644
--- a/document/array.go
+++ b/document/array.go
@@ -168,7 +168,7 @@ func (a *sortableArray) Swap(i, j int) { a.vb[i], a.vb[j] = a.vb[j], a.vb[i] }
 var typeSortOrder = map[ValueType]int{
 	NullValue:     0,
 	BoolValue:     1,
-	Float64Value:  2,
+	DoubleValue:   2,
 	TextValue:     3,
 	ArrayValue:    4,
 	DocumentValue: 5,
@@ -183,14 +183,14 @@ func (a *sortableArray) Less(i, j int) (ok bool) {
 
 	switch {
 	case it.IsNumber():
-		it = Float64Value
+		it = DoubleValue
 	case it == BlobValue:
 		it = TextValue
 	}
 
 	switch {
 	case jt.IsNumber():
-		jt = Float64Value
+		jt = DoubleValue
 	case jt == BlobValue:
 		jt = TextValue
 	}
diff --git a/document/create.go b/document/create.go
index a1594cc1..833d1a9e 100644
--- a/document/create.go
+++ b/document/create.go
@@ -166,15 +166,15 @@ func NewValue(x interface{}) (Value, error) {
 	case reflect.Bool:
 		return NewBoolValue(v.Bool()), nil
 	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
-		return intToValue(v.Int()), nil
+		return NewIntegerValue(v.Int()), nil
 	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
 		x := v.Uint()
 		if x > math.MaxInt64 {
 			return Value{}, fmt.Errorf("cannot convert unsigned integer struct field to int64: %d out of range", x)
 		}
-		return intToValue(int64(x)), nil
+		return NewIntegerValue(int64(x)), nil
 	case reflect.Float32, reflect.Float64:
-		return NewFloat64Value(v.Float()), nil
+		return NewDoubleValue(v.Float()), nil
 	case reflect.String:
 		return NewTextValue(v.String()), nil
 	case reflect.Interface:
diff --git a/document/encoding/encoding.go b/document/encoding/encoding.go
index 5856d0df..f4a80c6c 100644
--- a/document/encoding/encoding.go
+++ b/document/encoding/encoding.go
@@ -237,15 +237,9 @@ func EncodeValue(v document.Value) ([]byte, error) {
 			return nil, err
 		}
 		return EncodeBool(x), nil
-	case document.Int8Value:
-		return EncodeInt8(v.V.(int8)), nil
-	case document.Int16Value:
-		return EncodeInt16(v.V.(int16)), nil
-	case document.Int32Value:
-		return EncodeInt32(v.V.(int32)), nil
-	case document.Int64Value:
+	case document.IntegerValue:
 		return EncodeInt64(v.V.(int64)), nil
-	case document.Float64Value:
+	case document.DoubleValue:
 		return EncodeFloat64(v.V.(float64)), nil
 	case document.DurationValue:
 		return EncodeInt64(int64(v.V.(time.Duration))), nil
@@ -277,36 +271,18 @@ func DecodeValue(t document.ValueType, data []byte) (document.Value, error) {
 			return document.Value{}, err
 		}
 		return document.NewBoolValue(x), nil
-	case document.Int8Value:
-		x, err := DecodeInt8(data)
-		if err != nil {
-			return document.Value{}, err
-		}
-		return document.NewInt8Value(x), nil
-	case document.Int16Value:
-		x, err := DecodeInt16(data)
-		if err != nil {
-			return document.Value{}, err
-		}
-		return document.NewInt16Value(x), nil
-	case document.Int32Value:
-		x, err := DecodeInt32(data)
-		if err != nil {
-			return document.Value{}, err
-		}
-		return document.NewInt32Value(x), nil
-	case document.Int64Value:
+	case document.IntegerValue:
 		x, err := DecodeInt64(data)
 		if err != nil {
 			return document.Value{}, err
 		}
-		return document.NewInt64Value(x), nil
-	case document.Float64Value:
+		return document.NewIntegerValue(x), nil
+	case document.DoubleValue:
 		x, err := DecodeFloat64(data)
 		if err != nil {
 			return document.Value{}, err
 		}
-		return document.NewFloat64Value(x), nil
+		return document.NewDoubleValue(x), nil
 	case document.DurationValue:
 		x, err := DecodeInt64(data)
 		if err != nil {
diff --git a/document/encoding/msgpack/codec.go b/document/encoding/msgpack/codec.go
index e6e7a7a6..072251c2 100644
--- a/document/encoding/msgpack/codec.go
+++ b/document/encoding/msgpack/codec.go
@@ -127,15 +127,9 @@ func (e *Encoder) EncodeValue(v document.Value) error {
 		return e.enc.EncodeBytes(b)
 	case document.BoolValue:
 		return e.enc.EncodeBool(v.V.(bool))
-	case document.Int8Value:
-		return e.enc.EncodeInt8(v.V.(int8))
-	case document.Int16Value:
-		return e.enc.EncodeInt16(v.V.(int16))
-	case document.Int32Value:
-		return e.enc.EncodeInt32(v.V.(int32))
-	case document.Int64Value:
+	case document.IntegerValue:
 		return e.enc.EncodeInt64(v.V.(int64))
-	case document.Float64Value:
+	case document.DoubleValue:
 		return e.enc.EncodeFloat64(v.V.(float64))
 	case document.DurationValue:
 		// because messagepack doesn't have a duration type
@@ -285,44 +279,23 @@ func (d *Decoder) DecodeValue() (v document.Value, err error) {
 		}
 		v.Type = document.BoolValue
 		return
-	case codes.Int8:
-		v.V, err = d.dec.DecodeInt8()
-		if err != nil {
-			return
-		}
-		v.Type = document.Int8Value
-		return
-	case codes.Int16:
-		v.V, err = d.dec.DecodeInt16()
-		if err != nil {
-			return
-		}
-		v.Type = document.Int16Value
-		return
-	case codes.Int32:
-		v.V, err = d.dec.DecodeInt32()
-		if err != nil {
-			return
-		}
-		v.Type = document.Int32Value
-		return
-	case codes.Int64:
+	case codes.Int8, codes.Int16, codes.Int32, codes.Int64, codes.Uint8, codes.Uint16, codes.Uint32, codes.Uint64:
 		v.V, err = d.dec.DecodeInt64()
 		if err != nil {
 			return
 		}
-		v.Type = document.Int64Value
+		v.Type = document.IntegerValue
 		return
 	case codes.Double:
 		v.V, err = d.dec.DecodeFloat64()
 		if err != nil {
 			return
 		}
-		v.Type = document.Float64Value
+		v.Type = document.DoubleValue
 		return
 	}
 
-	panic("unsupported type")
+	panic(fmt.Sprintf("unsupported type %v", c))
 }
 
 // DecodeDocument decodes one document from the reader.
diff --git a/document/json.go b/document/json.go
index e918cac7..ce481ac9 100644
--- a/document/json.go
+++ b/document/json.go
@@ -8,7 +8,6 @@ import (
 	"encoding/json"
 	"fmt"
 	"io"
-	"math"
 	"strconv"
 	"strings"
 
@@ -242,19 +241,10 @@ func parseJSONValue(dec *json.Decoder) (Value, error) {
 				return Value{}, err
 			}
 
-			return NewFloat64Value(f), nil
+			return NewDoubleValue(f), nil
 		}
 
-		switch {
-		case i >= math.MinInt8 && i <= math.MaxInt8:
-			return NewInt8Value(int8(i)), nil
-		case i >= math.MinInt16 && i <= math.MaxInt16:
-			return NewInt16Value(int16(i)), nil
-		case i >= math.MinInt32 && i <= math.MaxInt32:
-			return NewInt32Value(int32(i)), nil
-		default:
-			return NewInt64Value(int64(i)), nil
-		}
+		return NewIntegerValue(int64(i)), nil
 	case json.Delim:
 		switch tt {
 		case ']', '}':
diff --git a/document/value.go b/document/value.go
index 53e050eb..cdaa4272 100644
--- a/document/value.go
+++ b/document/value.go
@@ -10,17 +10,14 @@ import (
 )
 
 var (
-	arrayZeroValue    = NewZeroValue(ArrayValue)
-	blobZeroValue     = NewZeroValue(BlobValue)
 	boolZeroValue     = NewZeroValue(BoolValue)
-	documentZeroValue = NewZeroValue(DocumentValue)
+	integerZeroValue  = NewZeroValue(IntegerValue)
+	doubleZeroValue   = NewZeroValue(DoubleValue)
 	durationZeroValue = NewZeroValue(DurationValue)
-	float64ZeroValue  = NewZeroValue(Float64Value)
-	int8ZeroValue     = NewZeroValue(Int8Value)
-	int16ZeroValue    = NewZeroValue(Int16Value)
-	int32ZeroValue    = NewZeroValue(Int32Value)
-	int64ZeroValue    = NewZeroValue(Int64Value)
+	blobZeroValue     = NewZeroValue(BlobValue)
 	textZeroValue     = NewZeroValue(TextValue)
+	arrayZeroValue    = NewZeroValue(ArrayValue)
+	documentZeroValue = NewZeroValue(DocumentValue)
 )
 
 // ErrUnsupportedType is used to skip struct or array fields that are not supported.
@@ -37,50 +34,53 @@ func (e *ErrUnsupportedType) Error() string {
 type ValueType uint8
 
 // List of supported value types.
+// These types are separated by family so that when
+// new types are introduced we don't need to modify them.
 const (
-	BlobValue ValueType = iota + 1
-	TextValue
-	BoolValue
-	Int8Value
-	Int16Value
-	Int32Value
-	Int64Value
-	Float64Value
+	NullValue ValueType = 0x1
+
+	BoolValue = 0x5
+
+	// integer family: 0x10 to 0x1F
+	IntegerValue = 0x10
+
+	// double family: 0x20 to 0x2F
+	DoubleValue = 0x20
 
-	NullValue
+	// time family: 0x30 to 0x3F
+	DurationValue = 0x30
 
-	DocumentValue
-	ArrayValue
+	// string family: 0x40 to 0x4F
+	BlobValue = 0x40
+	TextValue = 0x41
 
-	DurationValue
+	// array family: 0x40 to 0x5F
+	ArrayValue = 0x50
+
+	// document family: 0x60 to 0x6F
+	DocumentValue = 0x60
 )
 
 func (t ValueType) String() string {
 	switch t {
+	case NullValue:
+		return "null"
+	case BoolValue:
+		return "bool"
+	case IntegerValue:
+		return "integer"
+	case DoubleValue:
+		return "double"
+	case DurationValue:
+		return "duration"
 	case BlobValue:
 		return "blob"
 	case TextValue:
 		return "text"
-	case BoolValue:
-		return "bool"
-	case Int8Value:
-		return "int8"
-	case Int16Value:
-		return "int16"
-	case Int32Value:
-		return "int32"
-	case Int64Value:
-		return "int64"
-	case Float64Value:
-		return "float64"
-	case NullValue:
-		return "null"
-	case DocumentValue:
-		return "document"
 	case ArrayValue:
 		return "array"
-	case DurationValue:
-		return "duration"
+	case DocumentValue:
+		return "document"
 	}
 
 	return ""
@@ -93,12 +93,12 @@ func (t ValueType) IsNumber() bool {
 
 // IsInteger returns true if t is a signed or unsigned integer of any size.
 func (t ValueType) IsInteger() bool {
-	return t >= Int8Value && t <= Int64Value || t == DurationValue
+	return t == IntegerValue || t == DurationValue
 }
 
-// IsFloat returns true if t is either a Float32 or Float64.
+// IsFloat returns true if t is a Double.
 func (t ValueType) IsFloat() bool {
-	return t == Float64Value
+	return t == DoubleValue
 }
 
 // A Value stores encoded data alongside its type.
@@ -107,19 +107,10 @@ type Value struct {
 	V    interface{}
 }
 
-// NewBlobValue encodes x and returns a value.
-func NewBlobValue(x []byte) Value {
-	return Value{
-		Type: BlobValue,
-		V:    x,
-	}
-}
-
-// NewTextValue encodes x and returns a value.
-func NewTextValue(x string) Value {
+// NewNullValue returns a Null value.
+func NewNullValue() Value {
 	return Value{
-		Type: TextValue,
-		V:    []byte(x),
+		Type: NullValue,
 	}
 }
 
@@ -131,56 +122,52 @@ func NewBoolValue(x bool) Value {
 	}
 }
 
-// NewIntValue encodes x and returns a value whose type depends on the
+// NewIntegerValue encodes x and returns a value whose type depends on the
 // magnitude of x.
-func NewIntValue(x int) Value {
-	return intToValue(int64(x))
-}
-
-// NewInt8Value encodes x and returns a value.
-func NewInt8Value(x int8) Value {
+func NewIntegerValue(x int64) Value {
 	return Value{
-		Type: Int8Value,
-		V:    x,
+		Type: IntegerValue,
+		V:    int64(x),
 	}
 }
 
-// NewInt16Value encodes x and returns a value.
-func NewInt16Value(x int16) Value {
+// NewDoubleValue encodes x and returns a value.
+func NewDoubleValue(x float64) Value {
 	return Value{
-		Type: Int16Value,
+		Type: DoubleValue,
 		V:    x,
 	}
 }
 
-// NewInt32Value encodes x and returns a value.
-func NewInt32Value(x int32) Value {
+// NewDurationValue returns a value of type Duration.
+func NewDurationValue(d time.Duration) Value {
 	return Value{
-		Type: Int32Value,
-		V:    x,
+		Type: DurationValue,
+		V:    d,
 	}
 }
 
-// NewInt64Value encodes x and returns a value.
-func NewInt64Value(x int64) Value {
+// NewBlobValue encodes x and returns a value.
+func NewBlobValue(x []byte) Value {
 	return Value{
-		Type: Int64Value,
+		Type: BlobValue,
 		V:    x,
 	}
 }
 
-// NewFloat64Value encodes x and returns a value.
-func NewFloat64Value(x float64) Value {
+// NewTextValue encodes x and returns a value.
+func NewTextValue(x string) Value {
 	return Value{
-		Type: Float64Value,
-		V:    x,
+		Type: TextValue,
+		V:    []byte(x),
 	}
 }
 
-// NewNullValue returns a Null value.
-func NewNullValue() Value {
+// NewArrayValue returns a value of type Array.
+func NewArrayValue(a Array) Value {
 	return Value{
-		Type: NullValue,
+		Type: ArrayValue,
+		V:    a,
 	}
 }
 
@@ -192,61 +179,28 @@ func NewDocumentValue(d Document) Value {
 	}
 }
 
-// NewDurationValue returns a value of type Duration.
-func NewDurationValue(d time.Duration) Value {
-	return Value{
-		Type: DurationValue,
-		V:    d,
-	}
-}
-
-// NewArrayValue returns a value of type Array.
-func NewArrayValue(a Array) Value {
-	return Value{
-		Type: ArrayValue,
-		V:    a,
-	}
-}
-
-func intToValue(x int64) Value {
-	switch {
-	case x <= math.MaxInt8 && x >= math.MinInt8:
-		return NewInt8Value(int8(x))
-	case x <= math.MaxInt16 && x >= math.MinInt16:
-		return NewInt16Value(int16(x))
-	case x <= math.MaxInt32 && x >= math.MinInt32:
-		return NewInt32Value(int32(x))
-	}
-
-	return NewInt64Value(x)
-}
-
 // NewZeroValue returns a value whose value is equal to the Go zero value
 // of the selected type.
 func NewZeroValue(t ValueType) Value {
 	switch t {
+	case NullValue:
+		return NewNullValue()
+	case BoolValue:
+		return NewBoolValue(false)
+	case IntegerValue:
+		return NewIntegerValue(0)
+	case DoubleValue:
+		return NewDoubleValue(0)
+	case DurationValue:
+		return NewDurationValue(0)
 	case BlobValue:
 		return NewBlobValue(nil)
 	case TextValue:
 		return NewTextValue("")
-	case BoolValue:
-		return NewBoolValue(false)
-	case Int8Value:
-		return NewInt8Value(0)
-	case Int16Value:
-		return NewInt16Value(0)
-	case Int32Value:
-		return NewInt32Value(0)
-	case Int64Value:
-		return NewInt64Value(0)
-	case Float64Value:
-		return NewFloat64Value(0)
-	case DocumentValue:
-		return NewDocumentValue(NewFieldBuffer())
 	case ArrayValue:
 		return NewArrayValue(NewValueBuffer())
-	case DurationValue:
-		return NewDurationValue(0)
+	case DocumentValue:
+		return NewDocumentValue(NewFieldBuffer())
 	}
 
 	return Value{}
@@ -274,70 +228,42 @@ func (v Value) ConvertTo(t ValueType) (Value, error) {
 	}
 
 	switch t {
-	case BlobValue:
-		x, err := v.ConvertToBlob()
-		if err != nil {
-			return Value{}, err
-		}
-		return NewBlobValue(x), nil
-	case TextValue:
-		x, err := v.ConvertToText()
-		if err != nil {
-			return Value{}, err
-		}
-		return NewTextValue(x), nil
 	case BoolValue:
 		x, err := v.ConvertToBool()
 		if err != nil {
 			return Value{}, err
 		}
 		return NewBoolValue(x), nil
-	case Int8Value:
-		x, err := v.ConvertToInt64()
-		if err != nil {
-			return Value{}, fmt.Errorf(`cannot convert %q to "int8": %w`, v.Type, err)
-		}
-		if x > math.MaxInt8 {
-			return Value{}, fmt.Errorf(`cannot convert %q to "int8": out of range`, v.Type)
-		}
-
-		return NewInt8Value(int8(x)), nil
-	case Int16Value:
-		x, err := v.ConvertToInt64()
-		if err != nil {
-			return Value{}, fmt.Errorf(`cannot convert %q to "int16": %w`, v.Type, err)
-		}
-		if x > math.MaxInt16 {
-			return Value{}, fmt.Errorf(`cannot convert %q to "int16": out of range`, v.Type)
-		}
-		return NewInt16Value(int16(x)), nil
-	case Int32Value:
-		x, err := v.ConvertToInt64()
-		if err != nil {
-			return Value{}, fmt.Errorf(`cannot convert %q to "int32": %w`, v.Type, err)
-		}
-		if x > math.MaxInt32 {
-			return Value{}, fmt.Errorf(`cannot convert %q to "int32": out of range`, v.Type)
-		}
-		return NewInt32Value(int32(x)), nil
-	case Int64Value:
+	case IntegerValue:
 		x, err := v.ConvertToInt64()
 		if err != nil {
-			return Value{}, fmt.Errorf(`cannot convert %q to "int64": %w`, v.Type, err)
+			return Value{}, fmt.Errorf(`cannot convert %q to "integer": %w`, v.Type, err)
 		}
-		return NewInt64Value(x), nil
-	case Float64Value:
+		return NewIntegerValue(x), nil
+	case DoubleValue:
 		x, err := v.ConvertToFloat64()
 		if err != nil {
 			return Value{}, err
 		}
-		return NewFloat64Value(x), nil
+		return NewDoubleValue(x), nil
 	case DurationValue:
 		x, err := v.ConvertToDuration()
 		if err != nil {
 			return Value{}, err
 		}
 		return NewDurationValue(x), nil
+	case BlobValue:
+		x, err := v.ConvertToBlob()
+		if err != nil {
+			return Value{}, err
+		}
+		return NewBlobValue(x), nil
+	case TextValue:
+		x, err := v.ConvertToText()
+		if err != nil {
+			return Value{}, err
+		}
+		return NewTextValue(x), nil
 	}
 
 	return Value{}, fmt.Errorf("cannot convert %q to %q", v.Type, t)
@@ -390,7 +316,7 @@ func (v Value) ConvertToBool() (bool, error) {
 // ConvertToInt64 turns any number into an int64.
 // It doesn't work with other types.
 func (v Value) ConvertToInt64() (int64, error) {
-	if v.Type == Int64Value {
+	if v.Type == IntegerValue {
 		return v.V.(int64), nil
 	}
 
@@ -416,7 +342,7 @@ func (v Value) ConvertToInt64() (int64, error) {
 // ConvertToFloat64 turns any number into a float64.
 // It doesn't work with other types.
 func (v Value) ConvertToFloat64() (float64, error) {
-	if v.Type == Float64Value {
+	if v.Type == DoubleValue {
 		return v.V.(float64), nil
 	}
 
@@ -440,7 +366,7 @@ func (v Value) ConvertToFloat64() (float64, error) {
 		return 0, nil
 	}
 
-	return 0, fmt.Errorf(`cannot convert %q to "float64"`, v.Type)
+	return 0, fmt.Errorf(`cannot convert %q to "double"`, v.Type)
 }
 
 // ConvertToDocument returns a document from the value.
@@ -498,22 +424,16 @@ func (v Value) ConvertToDuration() (time.Duration, error) {
 // This function doesn't perform any allocation.
 func (v Value) IsZeroValue() (bool, error) {
 	switch v.Type {
-	case BlobValue, TextValue:
-		return bytesutil.CompareBytes(v.V.([]byte), blobZeroValue.V.([]byte)) == 0, nil
 	case BoolValue:
 		return v.V == boolZeroValue.V, nil
-	case Int8Value:
-		return v.V == int8ZeroValue.V, nil
-	case Int16Value:
-		return v.V == int16ZeroValue.V, nil
-	case Int32Value:
-		return v.V == int32ZeroValue.V, nil
-	case Int64Value:
-		return v.V == int64ZeroValue.V, nil
-	case Float64Value:
-		return v.V == float64ZeroValue.V, nil
+	case IntegerValue:
+		return v.V == integerZeroValue.V, nil
+	case DoubleValue:
+		return v.V == doubleZeroValue.V, nil
 	case DurationValue:
 		return v.V == durationZeroValue.V, nil
+	case BlobValue, TextValue:
+		return bytesutil.CompareBytes(v.V.([]byte), blobZeroValue.V.([]byte)) == 0, nil
 	case ArrayValue:
 		// The zero value of an array is an empty array.
 		// Thus, if GetByIndex(0) returns the ErrValueNotFound
@@ -604,14 +524,14 @@ func calculateValues(a, b Value, operator byte) (res Value, err error) {
 	}
 
 	if a.Type == BoolValue {
-		a, err = a.ConvertTo(Int64Value)
+		a, err = a.ConvertTo(IntegerValue)
 		if err != nil {
 			return
 		}
 	}
 
 	if b.Type == BoolValue {
-		b, err = b.ConvertTo(Int64Value)
+		b, err = b.ConvertTo(IntegerValue)
 		if err != nil {
 			return
 		}
@@ -644,21 +564,15 @@ func convertNumberToInt64(v Value) (int64, error) {
 	var i int64
 
 	switch v.Type {
-	case Int8Value:
-		i = int64(v.V.(int8))
-	case Int16Value:
-		i = int64(v.V.(int16))
-	case Int32Value:
-		i = int64(v.V.(int32))
-	case Int64Value:
+	case IntegerValue:
 		return v.V.(int64), nil
-	case Float64Value:
+	case DoubleValue:
 		f := v.V.(float64)
 		if f > math.MaxInt64 {
-			return i, errors.New(`cannot convert "float64" to "integer" without overflowing`)
+			return i, errors.New(`cannot convert "double" to "integer" without overflowing`)
 		}
 		if math.Trunc(f) != f {
-			return 0, errors.New(`cannot convert "float64" value to "integer" without loss of precision`)
+			return 0, errors.New(`cannot convert "double" value to "integer" without loss of precision`)
 		}
 		i = int64(f)
 	case DurationValue:
@@ -692,12 +606,12 @@ func calculateIntegers(a, b Value, operator byte) (res Value, err error) {
 		// if there is an integer overflow
 		// convert to float
 		if (xr > xa) != (xb > 0) {
-			return NewFloat64Value(float64(xa) + float64(xb)), nil
+			return NewDoubleValue(float64(xa) + float64(xb)), nil
 		}
-		return NewIntValue(int(xr)), nil
+		return NewIntegerValue(xr), nil
 	case '*':
 		if xa == 0 || xb == 0 {
-			return NewIntValue(0), nil
+			return NewIntegerValue(0), nil
 		}
 
 		xr = xa * xb
@@ -706,28 +620,28 @@ func calculateIntegers(a, b Value, operator byte) (res Value, err error) {
 		// convert to float
 		if (xr < 0) == ((xa < 0) != (xb < 0)) {
 			if xr/xb == xa {
-				return NewIntValue(int(xr)), nil
+				return NewIntegerValue(xr), nil
 			}
 		}
-		return NewFloat64Value(float64(xa) * float64(xb)), nil
+		return NewDoubleValue(float64(xa) * float64(xb)), nil
 	case '/':
 		if xb == 0 {
 			return NewNullValue(), nil
 		}
 
-		return NewIntValue(int(xa / xb)), nil
+		return NewIntegerValue(xa / xb), nil
 	case '%':
 		if xb == 0 {
 			return NewNullValue(), nil
 		}
 
-		return NewIntValue(int(xa % xb)), nil
+		return NewIntegerValue(xa % xb), nil
 	case '&':
-		return NewIntValue(int(xa & xb)), nil
+		return NewIntegerValue(xa & xb), nil
 	case '|':
-		return NewIntValue(int(xa | xb)), nil
+		return NewIntegerValue(xa | xb), nil
 	case '^':
-		return NewIntValue(int(xa ^ xb)), nil
+		return NewIntegerValue(xa ^ xb), nil
 	default:
 		panic(fmt.Sprintf("unknown operator %c", operator))
 	}
@@ -748,33 +662,33 @@ func calculateFloats(a, b Value, operator byte) (res Value, err error) {
 
 	switch operator {
 	case '+':
-		return NewFloat64Value(xa + xb), nil
+		return NewDoubleValue(xa + xb), nil
 	case '-':
-		return NewFloat64Value(xa - xb), nil
+		return NewDoubleValue(xa - xb), nil
 	case '*':
-		return NewFloat64Value(xa * xb), nil
+		return NewDoubleValue(xa * xb), nil
 	case '/':
 		if xb == 0 {
 			return NewNullValue(), nil
 		}
 
-		return NewFloat64Value(xa / xb), nil
+		return NewDoubleValue(xa / xb), nil
 	case '%':
 		if xb == 0 {
 			return NewNullValue(), nil
 		}
 
 		ia, ib := int64(xa), int64(xb)
-		return NewFloat64Value(float64(ia % ib)), nil
+		return NewDoubleValue(float64(ia % ib)), nil
 	case '&':
 		ia, ib := int64(xa), int64(xb)
-		return NewIntValue(int(ia & ib)), nil
+		return NewIntegerValue(ia & ib), nil
 	case '|':
 		ia, ib := int64(xa), int64(xb)
-		return NewIntValue(int(ia | ib)), nil
+		return NewIntegerValue(ia | ib), nil
 	case '^':
 		ia, ib := int64(xa), int64(xb)
-		return NewIntValue(int(ia ^ ib)), nil
+		return NewIntegerValue(ia ^ ib), nil
 	default:
 		panic(fmt.Sprintf("unknown operator %c", operator))
 	}
diff --git a/document/value_wasm.go b/document/value_wasm.go
index 2e27e95c..867e721e 100644
--- a/document/value_wasm.go
+++ b/document/value_wasm.go
@@ -16,11 +16,11 @@ func NewValue(x interface{}) (Value, error) {
 	case Array:
 		return NewArrayValue(v), nil
 	case int:
-		return NewIntValue(v), nil
+		return NewIntegerValue(int64(v)), nil
 	case bool:
 		return NewBoolValue(v), nil
 	case float64:
-		return NewFloat64Value(v), nil
+		return NewDoubleValue(v), nil
 	case string:
 		return NewTextValue(v), nil
 	}
diff --git a/index/index.go b/index/index.go
index d2c1a9ef..5e7c8514 100644
--- a/index/index.go
+++ b/index/index.go
@@ -132,7 +132,7 @@ func EmptyPivot(t document.ValueType) *Pivot {
 // EncodeFieldToIndexValue returns a byte array that represents the value in such
 // a way that can be compared for ordering and indexing
 func EncodeFieldToIndexValue(val document.Value) ([]byte, error) {
-	if val.V != nil && val.Type.IsNumber() && val.Type != document.Float64Value {
+	if val.V != nil && val.Type.IsNumber() && val.Type != document.DoubleValue {
 		x, err := val.ConvertToFloat64()
 		if err != nil {
 			return nil, err
@@ -152,7 +152,7 @@ func decodeIndexValueToField(t Type, data []byte) (document.Value, error) {
 		return document.NewBlobValue(data), nil
 	case Float:
 		f, err := encoding.DecodeFloat64(data)
-		return document.NewFloat64Value(f), err
+		return document.NewDoubleValue(f), err
 	case Bool:
 		b, err := encoding.DecodeBool(data)
 		return document.NewBoolValue(b), err
diff --git a/sql/parser/expr.go b/sql/parser/expr.go
index 26741578..7845ccb2 100644
--- a/sql/parser/expr.go
+++ b/sql/parser/expr.go
@@ -180,17 +180,17 @@ func (p *Parser) parseUnaryExpr() (expr.Expr, error) {
 		if err != nil {
 			return nil, &ParseError{Message: "unable to parse number", Pos: pos}
 		}
-		return expr.Float64Value(v), nil
+		return expr.DoubleValue(v), nil
 	case scanner.INTEGER:
-		v, err := strconv.Atoi(lit)
+		v, err := strconv.ParseInt(lit, 10, 64)
 		if err != nil {
 			// The literal may be too large to fit into an int64, parse as Float64
 			if v, err := strconv.ParseFloat(lit, 64); err == nil {
-				return expr.Float64Value(v), nil
+				return expr.DoubleValue(v), nil
 			}
 			return nil, &ParseError{Message: "unable to parse integer", Pos: pos}
 		}
-		return expr.IntValue(int(v)), nil
+		return expr.IntegerValue(v), nil
 	case scanner.TRUE, scanner.FALSE:
 		return expr.BoolValue(tok == scanner.TRUE), nil
 	case scanner.NULL:
@@ -289,18 +289,10 @@ func (p *Parser) parseType() document.ValueType {
 		return document.DocumentValue
 	case scanner.TYPEDURATION:
 		return document.DurationValue
-	case scanner.TYPEFLOAT64, scanner.TYPENUMERIC:
-		return document.Float64Value
-	case scanner.TYPEINT8:
-		return document.Int8Value
-	case scanner.TYPEINT16:
-		return document.Int16Value
-	case scanner.TYPEINT32:
-		return document.Int32Value
-	case scanner.TYPEINT64, scanner.TYPEINT, scanner.TYPEINTEGER:
-		return document.Int64Value
-	case scanner.TYPESTRING:
-		return document.TextValue
+	case scanner.TYPEDOUBLE:
+		return document.DoubleValue
+	case scanner.TYPEINTEGER:
+		return document.IntegerValue
 	case scanner.TYPETEXT:
 		return document.TextValue
 	}
diff --git a/sql/planner/input.go b/sql/planner/input.go
index 3e002f18..e79fdae4 100644
--- a/sql/planner/input.go
+++ b/sql/planner/input.go
@@ -168,7 +168,7 @@ func (it indexIterator) Iterate(fn func(d document.Document) error) error {
 	}
 
 	if v.Type.IsNumber() {
-		v, err = v.ConvertTo(document.Float64Value)
+		v, err = v.ConvertTo(document.DoubleValue)
 		if err != nil {
 			return err
 		}
diff --git a/sql/query/expr/function.go b/sql/query/expr/function.go
index b8738e3a..a524288c 100644
--- a/sql/query/expr/function.go
+++ b/sql/query/expr/function.go
@@ -42,7 +42,7 @@ func (k PKFunc) Eval(ctx EvalStack) (document.Value, error) {
 		return pk.Path.GetValue(ctx.Document)
 	}
 
-	return encoding.DecodeValue(document.Int64Value, ctx.Document.(document.Keyer).Key())
+	return encoding.DecodeValue(document.IntegerValue, ctx.Document.(document.Keyer).Key())
 }
 
 // IsEqual compares this expression with the other expression and returns
diff --git a/sql/query/expr/literal.go b/sql/query/expr/literal.go
index 98f97175..a00ce8a1 100644
--- a/sql/query/expr/literal.go
+++ b/sql/query/expr/literal.go
@@ -42,14 +42,14 @@ func BoolValue(v bool) LiteralValue {
 	return LiteralValue(document.NewBoolValue(v))
 }
 
-// IntValue creates a litteral value of type Int.
-func IntValue(v int) LiteralValue {
-	return LiteralValue(document.NewIntValue(v))
+// IntegerValue creates a litteral value of type Integer.
+func IntegerValue(v int64) LiteralValue {
+	return LiteralValue(document.NewIntegerValue(v))
 }
 
-// Float64Value creates a litteral value of type Float64.
-func Float64Value(v float64) LiteralValue {
-	return LiteralValue(document.NewFloat64Value(v))
+// DoubleValue creates a litteral value of type Double.
+func DoubleValue(v float64) LiteralValue {
+	return LiteralValue(document.NewDoubleValue(v))
 }
 
 // DurationValue creates a litteral value of type Duration.
diff --git a/sql/query/plan.go b/sql/query/plan.go
index dd1f4996..057c5742 100644
--- a/sql/query/plan.go
+++ b/sql/query/plan.go
@@ -340,7 +340,7 @@ func (it indexIterator) Iterate(fn func(d document.Document) error) error {
 	}
 
 	if v.Type.IsNumber() {
-		v, err = v.ConvertTo(document.Float64Value)
+		v, err = v.ConvertTo(document.DoubleValue)
 		if err != nil {
 			return err
 		}
diff --git a/sql/scanner/token.go b/sql/scanner/token.go
index 3263d151..5670c816 100644
--- a/sql/scanner/token.go
+++ b/sql/scanner/token.go
@@ -110,18 +110,11 @@ const (
 	TYPEBOOL
 	TYPEBYTES
 	TYPEDOCUMENT
+	TYPEDOUBLE
 	TYPEDURATION
-	TYPEFLOAT64
-	TYPEINT
-	TYPEINT8
-	TYPEINT16
-	TYPEINT32
-	TYPEINT64
-	TYPESTRING
+	TYPEINTEGER
+	TYPETEXT
 
-	TYPEINTEGER // alias to TYPEINT
-	TYPENUMERIC // alias to TYPEFLOAT64
-	TYPETEXT    // alias to TYPESTRING
 	keywordEnd
 )
 
@@ -214,18 +207,10 @@ var tokens = [...]string{
 	TYPEBOOL:     "BOOL",
 	TYPEBYTES:    "BYTES",
 	TYPEDOCUMENT: "DOCUMENT",
+	TYPEDOUBLE:   "DOUBLE",
 	TYPEDURATION: "DURATION",
-	TYPEFLOAT64:  "FLOAT64",
-	TYPEINT:      "INT",
-	TYPEINT8:     "INT8",
-	TYPEINT16:    "INT16",
-	TYPEINT32:    "INT32",
-	TYPEINT64:    "INT64",
-	TYPESTRING:   "STRING",
-
-	TYPEINTEGER: "INTEGER",
-	TYPENUMERIC: "NUMERIC",
-	TYPETEXT:    "TEXT",
+	TYPEINTEGER:  "INTEGER",
+	TYPETEXT:     "TEXT",
 }
 
 var keywords map[string]Token


Test patch:
diff --git a/database/config_test.go b/database/config_test.go
index 3da99b0a..d86a2578 100644
--- a/database/config_test.go
+++ b/database/config_test.go
@@ -25,7 +25,7 @@ func TestTableInfoStore(t *testing.T) {
 
 	info := &TableInfo{
 		FieldConstraints: []FieldConstraint{
-			{Path: []string{"k"}, Type: document.Float64Value, IsPrimaryKey: true},
+			{Path: []string{"k"}, Type: document.DoubleValue, IsPrimaryKey: true},
 		},
 	}
 
diff --git a/database/table_test.go b/database/table_test.go
index 42291da5..3b757ee3 100644
--- a/database/table_test.go
+++ b/database/table_test.go
@@ -106,7 +106,7 @@ func TestTableGetDocument(t *testing.T) {
 
 		// create two documents, one with an additional field
 		doc1 := newDocument()
-		vc := document.NewInt64Value(40)
+		vc := document.NewIntegerValue(40)
 		doc1.Add("fieldc", vc)
 		doc2 := newDocument()
 
@@ -232,7 +232,7 @@ func TestTableInsert(t *testing.T) {
 
 		err := tx.CreateTable("test", &database.TableInfo{
 			FieldConstraints: []database.FieldConstraint{
-				{Path: []string{"foo", "a", "1"}, Type: document.Int32Value, IsPrimaryKey: true},
+				{Path: []string{"foo", "a", "1"}, Type: document.IntegerValue, IsPrimaryKey: true},
 			},
 		})
 		require.NoError(t, err)
@@ -246,7 +246,7 @@ func TestTableInsert(t *testing.T) {
 		// insert
 		key, err := tb.Insert(doc)
 		require.NoError(t, err)
-		require.Equal(t, encoding.EncodeInt32(10), key)
+		require.Equal(t, encoding.EncodeInt64(10), key)
 
 		// make sure the document is fetchable using the returned key
 		_, err = tb.GetDocument(key)
@@ -264,7 +264,7 @@ func TestTableInsert(t *testing.T) {
 		err := tx.CreateTable("test", &database.TableInfo{
 			FieldConstraints: []database.FieldConstraint{
 				{Path: []string{"foo"}, Type: document.ArrayValue},
-				{Path: []string{"foo", "0"}, Type: document.Int32Value},
+				{Path: []string{"foo", "0"}, Type: document.IntegerValue},
 			},
 		})
 		require.NoError(t, err)
@@ -284,7 +284,7 @@ func TestTableInsert(t *testing.T) {
 
 		v, err := document.ValuePath([]string{"foo", "0"}).GetValue(d)
 		require.NoError(t, err)
-		require.Equal(t, document.NewInt32Value(100), v)
+		require.Equal(t, document.NewIntegerValue(100), v)
 	})
 
 	t.Run("Should fail if Pk not found in document or empty", func(t *testing.T) {
@@ -293,7 +293,7 @@ func TestTableInsert(t *testing.T) {
 
 		err := tx.CreateTable("test", &database.TableInfo{
 			FieldConstraints: []database.FieldConstraint{
-				{Path: []string{"foo"}, Type: document.Int32Value, IsPrimaryKey: true},
+				{Path: []string{"foo"}, Type: document.IntegerValue, IsPrimaryKey: true},
 			},
 		})
 		require.NoError(t, err)
@@ -336,7 +336,7 @@ func TestTableInsert(t *testing.T) {
 
 		// create one document with the foo field
 		doc1 := newDocument()
-		foo := document.NewFloat64Value(10)
+		foo := document.NewDoubleValue(10)
 		doc1.Add("foo", foo)
 
 		// create one document without the foo field
@@ -370,8 +370,8 @@ func TestTableInsert(t *testing.T) {
 
 		err := tx.CreateTable("test", &database.TableInfo{
 			FieldConstraints: []database.FieldConstraint{
-				{[]string{"foo"}, document.Int32Value, false, false},
-				{[]string{"bar"}, document.Int8Value, false, false},
+				{[]string{"foo"}, document.IntegerValue, false, false},
+				{[]string{"bar"}, document.IntegerValue, false, false},
 			},
 		})
 		require.NoError(t, err)
@@ -379,8 +379,8 @@ func TestTableInsert(t *testing.T) {
 		require.NoError(t, err)
 
 		doc := document.NewFieldBuffer().
-			Add("foo", document.NewIntValue(1)).
-			Add("bar", document.NewFloat64Value(10)).
+			Add("foo", document.NewIntegerValue(1)).
+			Add("bar", document.NewDoubleValue(10)).
 			Add("baz", document.NewTextValue("baaaaz"))
 
 		// insert
@@ -392,10 +392,10 @@ func TestTableInsert(t *testing.T) {
 		require.NoError(t, err)
 		v, err := d.GetByField("foo")
 		require.NoError(t, err)
-		require.Equal(t, document.NewInt32Value(1), v)
+		require.Equal(t, document.NewIntegerValue(1), v)
 		v, err = d.GetByField("bar")
 		require.NoError(t, err)
-		require.Equal(t, document.NewInt8Value(10), v)
+		require.Equal(t, document.NewIntegerValue(10), v)
 		v, err = d.GetByField("baz")
 		require.NoError(t, err)
 		require.Equal(t, document.NewTextValue("baaaaz"), v)
@@ -418,7 +418,7 @@ func TestTableInsert(t *testing.T) {
 		// enforced type, not null
 		err = tx.CreateTable("test2", &database.TableInfo{
 			FieldConstraints: []database.FieldConstraint{
-				{[]string{"foo"}, document.Int32Value, false, true},
+				{[]string{"foo"}, document.IntegerValue, false, true},
 			},
 		})
 		require.NoError(t, err)
@@ -427,7 +427,7 @@ func TestTableInsert(t *testing.T) {
 
 		// insert with empty foo field should fail
 		_, err = tb1.Insert(document.NewFieldBuffer().
-			Add("bar", document.NewFloat64Value(1)))
+			Add("bar", document.NewDoubleValue(1)))
 		require.Error(t, err)
 
 		// insert with null foo field should fail
@@ -437,12 +437,12 @@ func TestTableInsert(t *testing.T) {
 
 		// otherwise it should work
 		_, err = tb1.Insert(document.NewFieldBuffer().
-			Add("foo", document.NewFloat64Value(1)))
+			Add("foo", document.NewDoubleValue(1)))
 		require.NoError(t, err)
 
 		// insert with empty foo field should fail
 		_, err = tb2.Insert(document.NewFieldBuffer().
-			Add("bar", document.NewFloat64Value(1)))
+			Add("bar", document.NewDoubleValue(1)))
 		require.Error(t, err)
 
 		// insert with null foo field should fail
@@ -452,7 +452,7 @@ func TestTableInsert(t *testing.T) {
 
 		// otherwise it should work
 		_, err = tb2.Insert(document.NewFieldBuffer().
-			Add("foo", document.NewFloat64Value(1)))
+			Add("foo", document.NewDoubleValue(1)))
 		require.NoError(t, err)
 	})
 
@@ -471,11 +471,11 @@ func TestTableInsert(t *testing.T) {
 
 		// insert table with only one value
 		_, err = tb.Insert(document.NewFieldBuffer().
-			Add("foo", document.NewArrayValue(document.NewValueBuffer().Append(document.NewIntValue(1)))))
+			Add("foo", document.NewArrayValue(document.NewValueBuffer().Append(document.NewIntegerValue(1)))))
 		require.Error(t, err)
 		_, err = tb.Insert(document.NewFieldBuffer().
 			Add("foo", document.NewArrayValue(document.NewValueBuffer().
-				Append(document.NewIntValue(1)).Append(document.NewIntValue(2)))))
+				Append(document.NewIntegerValue(1)).Append(document.NewIntegerValue(2)))))
 		require.NoError(t, err)
 	})
 }
@@ -496,7 +496,7 @@ func TestTableDelete(t *testing.T) {
 
 		// create two documents, one with an additional field
 		doc1 := newDocument()
-		doc1.Add("fieldc", document.NewInt64Value(40))
+		doc1.Add("fieldc", document.NewIntegerValue(40))
 		doc2 := newDocument()
 
 		key1, err := tb.Insert(doc1)
@@ -667,7 +667,7 @@ func BenchmarkTableInsert(b *testing.B) {
 			var fb document.FieldBuffer
 
 			for i := int64(0); i < 10; i++ {
-				fb.Add(fmt.Sprintf("name-%d", i), document.NewInt64Value(i))
+				fb.Add(fmt.Sprintf("name-%d", i), document.NewIntegerValue(i))
 			}
 
 			b.ResetTimer()
@@ -696,7 +696,7 @@ func BenchmarkTableScan(b *testing.B) {
 			var fb document.FieldBuffer
 
 			for i := int64(0); i < 10; i++ {
-				fb.Add(fmt.Sprintf("name-%d", i), document.NewInt64Value(i))
+				fb.Add(fmt.Sprintf("name-%d", i), document.NewIntegerValue(i))
 			}
 
 			for i := 0; i < size; i++ {
diff --git a/database/transaction_test.go b/database/transaction_test.go
index 55df4e0c..7c1536ed 100644
--- a/database/transaction_test.go
+++ b/database/transaction_test.go
@@ -184,10 +184,10 @@ func TestTxReIndex(t *testing.T) {
 		tb, err := tx.GetTable("test")
 		require.NoError(t, err)
 
-		for i := 0; i < 10; i++ {
+		for i := int64(0); i < 10; i++ {
 			_, err = tb.Insert(document.NewFieldBuffer().
-				Add("a", document.NewIntValue(i)).
-				Add("b", document.NewIntValue(i*10)),
+				Add("a", document.NewIntegerValue(i)).
+				Add("b", document.NewIntegerValue(i*10)),
 			)
 			require.NoError(t, err)
 		}
@@ -227,8 +227,8 @@ func TestTxReIndex(t *testing.T) {
 		require.NoError(t, err)
 
 		var i int
-		err = idx.AscendGreaterOrEqual(index.EmptyPivot(document.Int64Value), func(val document.Value, key []byte) error {
-			require.Equal(t, document.NewFloat64Value(float64(i)), val)
+		err = idx.AscendGreaterOrEqual(index.EmptyPivot(document.IntegerValue), func(val document.Value, key []byte) error {
+			require.Equal(t, document.NewDoubleValue(float64(i)), val)
 			i++
 			return nil
 		})
@@ -239,7 +239,7 @@ func TestTxReIndex(t *testing.T) {
 		require.NoError(t, err)
 
 		i = 0
-		err = idx.AscendGreaterOrEqual(index.EmptyPivot(document.Int64Value), func(val document.Value, key []byte) error {
+		err = idx.AscendGreaterOrEqual(index.EmptyPivot(document.IntegerValue), func(val document.Value, key []byte) error {
 			i++
 			return nil
 		})
@@ -271,15 +271,15 @@ func TestReIndexAll(t *testing.T) {
 		tb2, err := tx.GetTable("test2")
 		require.NoError(t, err)
 
-		for i := 0; i < 10; i++ {
+		for i := int64(0); i < 10; i++ {
 			_, err = tb1.Insert(document.NewFieldBuffer().
-				Add("a", document.NewIntValue(i)).
-				Add("b", document.NewIntValue(i*10)),
+				Add("a", document.NewIntegerValue(i)).
+				Add("b", document.NewIntegerValue(i*10)),
 			)
 			require.NoError(t, err)
 			_, err = tb2.Insert(document.NewFieldBuffer().
-				Add("a", document.NewIntValue(i)).
-				Add("b", document.NewIntValue(i*10)),
+				Add("a", document.NewIntegerValue(i)).
+				Add("b", document.NewIntegerValue(i*10)),
 			)
 			require.NoError(t, err)
 		}
@@ -304,8 +304,8 @@ func TestReIndexAll(t *testing.T) {
 		require.NoError(t, err)
 
 		var i int
-		err = idx.AscendGreaterOrEqual(index.EmptyPivot(document.Int64Value), func(val document.Value, key []byte) error {
-			require.Equal(t, document.NewFloat64Value(float64(i)), val)
+		err = idx.AscendGreaterOrEqual(index.EmptyPivot(document.IntegerValue), func(val document.Value, key []byte) error {
+			require.Equal(t, document.NewDoubleValue(float64(i)), val)
 			i++
 			return nil
 		})
@@ -316,8 +316,8 @@ func TestReIndexAll(t *testing.T) {
 		require.NoError(t, err)
 
 		i = 0
-		err = idx.AscendGreaterOrEqual(index.EmptyPivot(document.Int64Value), func(val document.Value, key []byte) error {
-			require.Equal(t, document.NewFloat64Value(float64(i)), val)
+		err = idx.AscendGreaterOrEqual(index.EmptyPivot(document.IntegerValue), func(val document.Value, key []byte) error {
+			require.Equal(t, document.NewDoubleValue(float64(i)), val)
 			i++
 			return nil
 		})
diff --git a/document/array_test.go b/document/array_test.go
index 51be2bfb..74c99952 100644
--- a/document/array_test.go
+++ b/document/array_test.go
@@ -9,12 +9,12 @@ import (
 
 func TestArrayContains(t *testing.T) {
 	arr := NewValueBuffer(
-		NewIntValue(1),
+		NewIntegerValue(1),
 		NewTextValue("foo"),
 		NewBlobValue([]byte{1, 2, 3}),
 	)
 
-	ok, err := ArrayContains(arr, NewFloat64Value(1))
+	ok, err := ArrayContains(arr, NewDoubleValue(1))
 	require.NoError(t, err)
 	require.True(t, ok)
 
diff --git a/document/compare_test.go b/document/compare_test.go
index ef672146..e958e981 100644
--- a/document/compare_test.go
+++ b/document/compare_test.go
@@ -14,11 +14,8 @@ var numericFuncs = []struct {
 	name string
 	fn   func(x interface{}) document.Value
 }{
-	{"int8", func(x interface{}) document.Value { return document.NewInt8Value(int8(x.(int))) }},
-	{"int16", func(x interface{}) document.Value { return document.NewInt16Value(int16(x.(int))) }},
-	{"int32", func(x interface{}) document.Value { return document.NewInt32Value(int32(x.(int))) }},
-	{"int64", func(x interface{}) document.Value { return document.NewInt64Value(int64(x.(int))) }},
-	{"float64", func(x interface{}) document.Value { return document.NewFloat64Value(float64(x.(int))) }},
+	{"integer", func(x interface{}) document.Value { return document.NewIntegerValue(int64(x.(int))) }},
+	{"double", func(x interface{}) document.Value { return document.NewDoubleValue(float64(x.(int))) }},
 	{"duration", func(x interface{}) document.Value { return document.NewDurationValue(time.Duration(int64(x.(int)))) }},
 }
 
@@ -26,7 +23,7 @@ var textFuncs = []struct {
 	name string
 	fn   func(x interface{}) document.Value
 }{
-	{"string", func(x interface{}) document.Value { return document.NewTextValue(x.(string)) }},
+	{"text", func(x interface{}) document.Value { return document.NewTextValue(x.(string)) }},
 	{"bytes", func(x interface{}) document.Value { return document.NewBlobValue([]byte(x.(string))) }},
 }
 
@@ -416,7 +413,7 @@ func TestComparisonDifferentTypes(t *testing.T) {
 	}
 
 	t.Run("not equal with different types", func(t *testing.T) {
-		ok, err := document.NewIntValue(1).IsNotEqual(document.NewTextValue("foo"))
+		ok, err := document.NewIntegerValue(1).IsNotEqual(document.NewTextValue("foo"))
 		require.NoError(t, err)
 		require.True(t, ok)
 	})
diff --git a/document/document_test.go b/document/document_test.go
index 627a9b66..616490a6 100644
--- a/document/document_test.go
+++ b/document/document_test.go
@@ -14,7 +14,7 @@ var _ document.Document = new(document.FieldBuffer)
 
 func TestFieldBuffer(t *testing.T) {
 	var buf document.FieldBuffer
-	buf.Add("a", document.NewInt64Value(10))
+	buf.Add("a", document.NewIntegerValue(10))
 	buf.Add("b", document.NewTextValue("hello"))
 
 	t.Run("Iterate", func(t *testing.T) {
@@ -23,7 +23,7 @@ func TestFieldBuffer(t *testing.T) {
 			switch i {
 			case 0:
 				require.Equal(t, "a", f)
-				require.Equal(t, document.NewInt64Value(10), v)
+				require.Equal(t, document.NewIntegerValue(10), v)
 			case 1:
 				require.Equal(t, "b", f)
 				require.Equal(t, document.NewTextValue("hello"), v)
@@ -37,7 +37,7 @@ func TestFieldBuffer(t *testing.T) {
 
 	t.Run("Add", func(t *testing.T) {
 		var buf document.FieldBuffer
-		buf.Add("a", document.NewInt64Value(10))
+		buf.Add("a", document.NewIntegerValue(10))
 		buf.Add("b", document.NewTextValue("hello"))
 
 		c := document.NewBoolValue(true)
@@ -48,10 +48,10 @@ func TestFieldBuffer(t *testing.T) {
 	t.Run("ScanDocument", func(t *testing.T) {
 		var buf1, buf2 document.FieldBuffer
 
-		buf1.Add("a", document.NewInt64Value(10))
+		buf1.Add("a", document.NewIntegerValue(10))
 		buf1.Add("b", document.NewTextValue("hello"))
 
-		buf2.Add("a", document.NewInt64Value(20))
+		buf2.Add("a", document.NewIntegerValue(20))
 		buf2.Add("b", document.NewTextValue("bye"))
 		buf2.Add("c", document.NewBoolValue(true))
 
@@ -59,9 +59,9 @@ func TestFieldBuffer(t *testing.T) {
 		require.NoError(t, err)
 
 		var buf document.FieldBuffer
-		buf.Add("a", document.NewInt64Value(10))
+		buf.Add("a", document.NewIntegerValue(10))
 		buf.Add("b", document.NewTextValue("hello"))
-		buf.Add("a", document.NewInt64Value(20))
+		buf.Add("a", document.NewIntegerValue(20))
 		buf.Add("b", document.NewTextValue("bye"))
 		buf.Add("c", document.NewBoolValue(true))
 		require.Equal(t, buf, buf1)
@@ -70,7 +70,7 @@ func TestFieldBuffer(t *testing.T) {
 	t.Run("GetByField", func(t *testing.T) {
 		v, err := buf.GetByField("a")
 		require.NoError(t, err)
-		require.Equal(t, document.NewInt64Value(10), v)
+		require.Equal(t, document.NewIntegerValue(10), v)
 
 		v, err = buf.GetByField("not existing")
 		require.Equal(t, document.ErrFieldNotFound, err)
@@ -79,24 +79,24 @@ func TestFieldBuffer(t *testing.T) {
 
 	t.Run("Set", func(t *testing.T) {
 		var buf document.FieldBuffer
-		buf.Add("a", document.NewInt64Value(10))
+		buf.Add("a", document.NewIntegerValue(10))
 		buf.Add("b", document.NewTextValue("hello"))
 
-		buf.Set("a", document.NewFloat64Value(11))
+		buf.Set("a", document.NewDoubleValue(11))
 		v, err := buf.GetByField("a")
 		require.NoError(t, err)
-		require.Equal(t, document.NewFloat64Value(11), v)
+		require.Equal(t, document.NewDoubleValue(11), v)
 
-		buf.Set("c", document.NewInt64Value(12))
+		buf.Set("c", document.NewIntegerValue(12))
 		require.Equal(t, 3, buf.Len())
 		v, err = buf.GetByField("c")
 		require.NoError(t, err)
-		require.Equal(t, document.NewInt64Value(12), v)
+		require.Equal(t, document.NewIntegerValue(12), v)
 	})
 
 	t.Run("Delete", func(t *testing.T) {
 		var buf document.FieldBuffer
-		buf.Add("a", document.NewInt64Value(10))
+		buf.Add("a", document.NewIntegerValue(10))
 		buf.Add("b", document.NewTextValue("hello"))
 
 		err := buf.Delete("a")
@@ -117,7 +117,7 @@ func TestFieldBuffer(t *testing.T) {
 
 	t.Run("Replace", func(t *testing.T) {
 		var buf document.FieldBuffer
-		buf.Add("a", document.NewInt64Value(10))
+		buf.Add("a", document.NewIntegerValue(10))
 		buf.Add("b", document.NewTextValue("hello"))
 
 		err := buf.Replace("a", document.NewBoolValue(true))
@@ -125,7 +125,7 @@ func TestFieldBuffer(t *testing.T) {
 		v, err := buf.GetByField("a")
 		require.NoError(t, err)
 		require.Equal(t, document.NewBoolValue(true), v)
-		err = buf.Replace("d", document.NewInt64Value(11))
+		err = buf.Replace("d", document.NewIntegerValue(11))
 		require.Error(t, err)
 	})
 
@@ -140,26 +140,26 @@ func TestFieldBuffer(t *testing.T) {
 			{"empty object, missing closing bracket", "{", nil, true},
 			{"classic object", `{"a": 1, "b": true, "c": "hello", "d": [1, 2, 3], "e": {"f": "g"}}`,
 				document.NewFieldBuffer().
-					Add("a", document.NewInt8Value(1)).
+					Add("a", document.NewIntegerValue(1)).
 					Add("b", document.NewBoolValue(true)).
 					Add("c", document.NewTextValue("hello")).
 					Add("d", document.NewArrayValue(document.NewValueBuffer().
-						Append(document.NewInt8Value(1)).
-						Append(document.NewInt8Value(2)).
-						Append(document.NewInt8Value(3)))).
+						Append(document.NewIntegerValue(1)).
+						Append(document.NewIntegerValue(2)).
+						Append(document.NewIntegerValue(3)))).
 					Add("e", document.NewDocumentValue(document.NewFieldBuffer().Add("f", document.NewTextValue("g")))),
 				false},
 			{"string values", `{"a": "hello ciao"}`, document.NewFieldBuffer().Add("a", document.NewTextValue("hello ciao")), false},
-			{"+int8 values", `{"a": 1}`, document.NewFieldBuffer().Add("a", document.NewInt8Value(1)), false},
-			{"-int8 values", `{"a": -1}`, document.NewFieldBuffer().Add("a", document.NewInt8Value(-1)), false},
-			{"+int16 values", `{"a": 1000}`, document.NewFieldBuffer().Add("a", document.NewInt16Value(1000)), false},
-			{"-int16 values", `{"a": 1000}`, document.NewFieldBuffer().Add("a", document.NewInt16Value(1000)), false},
-			{"+int32 values", `{"a": 1000000}`, document.NewFieldBuffer().Add("a", document.NewInt32Value(1000000)), false},
-			{"-int32 values", `{"a": 1000000}`, document.NewFieldBuffer().Add("a", document.NewInt32Value(1000000)), false},
-			{"+int64 values", `{"a": 10000000000}`, document.NewFieldBuffer().Add("a", document.NewInt64Value(10000000000)), false},
-			{"-int64 values", `{"a": -10000000000}`, document.NewFieldBuffer().Add("a", document.NewInt64Value(-10000000000)), false},
-			{"+float64 values", `{"a": 10000000000.0}`, document.NewFieldBuffer().Add("a", document.NewFloat64Value(10000000000)), false},
-			{"-float64 values", `{"a": -10000000000.0}`, document.NewFieldBuffer().Add("a", document.NewFloat64Value(-10000000000)), false},
+			{"+int8 values", `{"a": 1}`, document.NewFieldBuffer().Add("a", document.NewIntegerValue(1)), false},
+			{"-int8 values", `{"a": -1}`, document.NewFieldBuffer().Add("a", document.NewIntegerValue(-1)), false},
+			{"+int16 values", `{"a": 1000}`, document.NewFieldBuffer().Add("a", document.NewIntegerValue(1000)), false},
+			{"-int16 values", `{"a": 1000}`, document.NewFieldBuffer().Add("a", document.NewIntegerValue(1000)), false},
+			{"+int32 values", `{"a": 1000000}`, document.NewFieldBuffer().Add("a", document.NewIntegerValue(1000000)), false},
+			{"-int32 values", `{"a": 1000000}`, document.NewFieldBuffer().Add("a", document.NewIntegerValue(1000000)), false},
+			{"+int64 values", `{"a": 10000000000}`, document.NewFieldBuffer().Add("a", document.NewIntegerValue(10000000000)), false},
+			{"-int64 values", `{"a": -10000000000}`, document.NewFieldBuffer().Add("a", document.NewIntegerValue(-10000000000)), false},
+			{"+float64 values", `{"a": 10000000000.0}`, document.NewFieldBuffer().Add("a", document.NewDoubleValue(10000000000)), false},
+			{"-float64 values", `{"a": -10000000000.0}`, document.NewFieldBuffer().Add("a", document.NewDoubleValue(-10000000000)), false},
 			{"bool values", `{"a": true, "b": false}`, document.NewFieldBuffer().Add("a", document.NewBoolValue(true)).Add("b", document.NewBoolValue(false)), false},
 			{"empty arrays", `{"a": []}`, document.NewFieldBuffer().Add("a", document.NewArrayValue(document.NewValueBuffer())), false},
 			{"nested arrays", `{"a": [[1,  2]]}`, document.NewFieldBuffer().
@@ -167,8 +167,8 @@ func TestFieldBuffer(t *testing.T) {
 					document.NewValueBuffer().
 						Append(document.NewArrayValue(
 							document.NewValueBuffer().
-								Append(document.NewInt8Value(1)).
-								Append(document.NewInt8Value(2)))))), false},
+								Append(document.NewIntegerValue(1)).
+								Append(document.NewIntegerValue(2)))))), false},
 			{"missing comma", `{"a": 1 "b": 2}`, nil, true},
 			{"missing closing brackets", `{"a": 1, "b": 2`, nil, true},
 		}
@@ -226,7 +226,7 @@ func TestNewFromMap(t *testing.T) {
 
 		v, err = doc.GetByField("age")
 		require.NoError(t, err)
-		require.Equal(t, document.NewIntValue(10), v)
+		require.Equal(t, document.NewIntegerValue(10), v)
 
 		v, err = doc.GetByField("nilField")
 		require.NoError(t, err)
@@ -340,53 +340,53 @@ func TestNewFromStruct(t *testing.T) {
 				require.Equal(t, u.C, v.V.(bool))
 			case 3:
 				require.Equal(t, "la-reponse-d", f)
-				require.EqualValues(t, u.D, v.V.(int8))
+				require.EqualValues(t, u.D, v.V.(int64))
 			case 4:
-				require.EqualValues(t, u.E, v.V.(int8))
+				require.EqualValues(t, u.E, v.V.(int64))
 			case 5:
-				require.EqualValues(t, u.F, v.V.(int8))
+				require.EqualValues(t, u.F, v.V.(int64))
 			case 6:
-				require.EqualValues(t, u.G, v.V.(int8))
+				require.EqualValues(t, u.G, v.V.(int64))
 			case 7:
-				require.EqualValues(t, u.H, v.V.(int8))
+				require.EqualValues(t, u.H, v.V.(int64))
 			case 8:
-				require.EqualValues(t, u.I, v.V.(int8))
+				require.EqualValues(t, u.I, v.V.(int64))
 			case 9:
-				require.EqualValues(t, u.J, v.V.(int8))
+				require.EqualValues(t, u.J, v.V.(int64))
 			case 10:
-				require.EqualValues(t, u.K, v.V.(int8))
+				require.EqualValues(t, u.K, v.V.(int64))
 			case 11:
-				require.EqualValues(t, u.L, v.V.(int8))
+				require.EqualValues(t, u.L, v.V.(int64))
 			case 12:
-				require.EqualValues(t, u.M, v.V.(int8))
+				require.EqualValues(t, u.M, v.V.(int64))
 			case 13:
 				require.Equal(t, u.N, v.V.(float64))
 			case 14:
-				require.Equal(t, document.DocumentValue, v.Type)
+				require.EqualValues(t, document.DocumentValue, v.Type)
 			case 15:
-				require.Equal(t, document.NullValue, v.Type)
+				require.EqualValues(t, document.NullValue, v.Type)
 			case 16:
-				require.EqualValues(t, *u.Q, v.V.(int8))
+				require.EqualValues(t, *u.Q, v.V.(int64))
 			case 17:
-				require.Equal(t, document.DocumentValue, v.Type)
+				require.EqualValues(t, document.DocumentValue, v.Type)
 			case 18:
-				require.Equal(t, document.NullValue, v.Type)
+				require.EqualValues(t, document.NullValue, v.Type)
 			case 19:
-				require.Equal(t, document.ArrayValue, v.Type)
+				require.EqualValues(t, document.ArrayValue, v.Type)
 			case 20:
-				require.Equal(t, document.NullValue, v.Type)
+				require.EqualValues(t, document.NullValue, v.Type)
 			case 21:
-				require.Equal(t, document.ArrayValue, v.Type)
+				require.EqualValues(t, document.ArrayValue, v.Type)
 			case 22:
-				require.Equal(t, document.ArrayValue, v.Type)
+				require.EqualValues(t, document.ArrayValue, v.Type)
 			case 23:
-				require.Equal(t, document.ArrayValue, v.Type)
+				require.EqualValues(t, document.ArrayValue, v.Type)
 			case 24:
-				require.Equal(t, document.ArrayValue, v.Type)
+				require.EqualValues(t, document.ArrayValue, v.Type)
 			case 25:
-				require.EqualValues(t, u.Z, v.V.(int8))
+				require.EqualValues(t, u.Z, v.V.(int64))
 			case 26:
-				require.Equal(t, document.NullValue, v.Type)
+				require.EqualValues(t, document.NullValue, v.Type)
 			default:
 				require.FailNowf(t, "", "unknown field %q", f)
 			}
@@ -414,34 +414,34 @@ func TestNewFromStruct(t *testing.T) {
 		require.Equal(t, u.C, v.V.(bool))
 		v, err = doc.GetByField("la-reponse-d")
 		require.NoError(t, err)
-		require.EqualValues(t, u.D, v.V.(int8))
+		require.EqualValues(t, u.D, v.V.(int64))
 		v, err = doc.GetByField("e")
 		require.NoError(t, err)
-		require.EqualValues(t, u.E, v.V.(int8))
+		require.EqualValues(t, u.E, v.V.(int64))
 		v, err = doc.GetByField("f")
 		require.NoError(t, err)
-		require.EqualValues(t, u.F, v.V.(int8))
+		require.EqualValues(t, u.F, v.V.(int64))
 		v, err = doc.GetByField("g")
 		require.NoError(t, err)
-		require.EqualValues(t, u.G, v.V.(int8))
+		require.EqualValues(t, u.G, v.V.(int64))
 		v, err = doc.GetByField("h")
 		require.NoError(t, err)
-		require.EqualValues(t, u.H, v.V.(int8))
+		require.EqualValues(t, u.H, v.V.(int64))
 		v, err = doc.GetByField("i")
 		require.NoError(t, err)
-		require.EqualValues(t, u.I, v.V.(int8))
+		require.EqualValues(t, u.I, v.V.(int64))
 		v, err = doc.GetByField("j")
 		require.NoError(t, err)
-		require.EqualValues(t, u.J, v.V.(int8))
+		require.EqualValues(t, u.J, v.V.(int64))
 		v, err = doc.GetByField("k")
 		require.NoError(t, err)
-		require.EqualValues(t, u.K, v.V.(int8))
+		require.EqualValues(t, u.K, v.V.(int64))
 		v, err = doc.GetByField("l")
 		require.NoError(t, err)
-		require.EqualValues(t, u.L, v.V.(int8))
+		require.EqualValues(t, u.L, v.V.(int64))
 		v, err = doc.GetByField("m")
 		require.NoError(t, err)
-		require.EqualValues(t, u.M, v.V.(int8))
+		require.EqualValues(t, u.M, v.V.(int64))
 		v, err = doc.GetByField("n")
 		require.NoError(t, err)
 		require.Equal(t, u.N, v.V.(float64))
@@ -452,7 +452,7 @@ func TestNewFromStruct(t *testing.T) {
 		require.NoError(t, err)
 		v, err = d.GetByField("a")
 		require.NoError(t, err)
-		require.EqualValues(t, 0, v.V.(int8))
+		require.EqualValues(t, 0, v.V.(int64))
 
 		v, err = doc.GetByField("t")
 		require.NoError(t, err)
@@ -461,7 +461,7 @@ func TestNewFromStruct(t *testing.T) {
 		var count int
 		err = a.Iterate(func(i int, v document.Value) error {
 			count++
-			require.EqualValues(t, i+1, v.V.(int8))
+			require.EqualValues(t, i+1, v.V.(int64))
 			return nil
 		})
 		require.NoError(t, err)
@@ -470,13 +470,13 @@ func TestNewFromStruct(t *testing.T) {
 		require.Equal(t, err, document.ErrFieldNotFound)
 		v, err = a.GetByIndex(1)
 		require.NoError(t, err)
-		require.EqualValues(t, 2, v.V.(int8))
+		require.EqualValues(t, 2, v.V.(int64))
 	})
 }
 
 type foo struct {
 	A string
-	B int
+	B int64
 	C bool
 	D float64
 }
@@ -489,7 +489,7 @@ func (f *foo) Iterate(fn func(field string, value document.Value) error) error {
 		return err
 	}
 
-	err = fn("b", document.NewIntValue(f.B))
+	err = fn("b", document.NewIntegerValue(f.B))
 	if err != nil {
 		return err
 	}
@@ -499,7 +499,7 @@ func (f *foo) Iterate(fn func(field string, value document.Value) error) error {
 		return err
 	}
 
-	err = fn("d", document.NewFloat64Value(f.D))
+	err = fn("d", document.NewDoubleValue(f.D))
 	if err != nil {
 		return err
 	}
@@ -512,11 +512,11 @@ func (f *foo) GetByField(field string) (document.Value, error) {
 	case "a":
 		return document.NewTextValue(f.A), nil
 	case "b":
-		return document.NewIntValue(f.B), nil
+		return document.NewIntegerValue(f.B), nil
 	case "c":
 		return document.NewBoolValue(f.C), nil
 	case "d":
-		return document.NewFloat64Value(f.D), nil
+		return document.NewDoubleValue(f.D), nil
 	}
 
 	return document.Value{}, errors.New("unknown field")
diff --git a/document/encoding/msgpack/encoding_test.go b/document/encoding/msgpack/encoding_test.go
index efbad9f4..d2d17f70 100644
--- a/document/encoding/msgpack/encoding_test.go
+++ b/document/encoding/msgpack/encoding_test.go
@@ -14,7 +14,7 @@ import (
 
 func TestGetByField(t *testing.T) {
 	doc := document.NewFieldBuffer().
-		Add("age", document.NewInt64Value(10)).
+		Add("age", document.NewIntegerValue(10)).
 		Add("address", document.NewNullValue()).
 		Add("name", document.NewTextValue("john")).
 		Add("d", document.NewDurationValue(10*time.Nanosecond)).
@@ -29,7 +29,7 @@ func TestGetByField(t *testing.T) {
 
 	v, err := d.GetByField("age")
 	require.NoError(t, err)
-	require.Equal(t, document.NewInt64Value(10), v)
+	require.Equal(t, document.NewIntegerValue(10), v)
 
 	v, err = d.GetByField("address")
 	require.NoError(t, err)
@@ -53,7 +53,7 @@ func TestGetByField(t *testing.T) {
 
 func TestGetByIndex(t *testing.T) {
 	arr := document.NewValueBuffer().
-		Append(document.NewInt64Value(10)).
+		Append(document.NewIntegerValue(10)).
 		Append(document.NewNullValue()).
 		Append(document.NewTextValue("john")).
 		Append(document.NewDurationValue(10 * time.Nanosecond))
@@ -65,7 +65,7 @@ func TestGetByIndex(t *testing.T) {
 
 	v, err := a.GetByIndex(0)
 	require.NoError(t, err)
-	require.Equal(t, document.NewInt64Value(10), v)
+	require.Equal(t, document.NewIntegerValue(10), v)
 
 	v, err = a.GetByIndex(1)
 	require.NoError(t, err)
@@ -100,7 +100,7 @@ func TestEncodeDecode(t *testing.T) {
 		{
 			"document.FieldBuffer",
 			document.NewFieldBuffer().
-				Add("age", document.NewInt64Value(10)).
+				Add("age", document.NewIntegerValue(10)).
 				Add("name", document.NewTextValue("john")),
 			`{"age": 10, "name": "john"}`,
 		},
@@ -112,7 +112,7 @@ func TestEncodeDecode(t *testing.T) {
 		{
 			"Nested Document",
 			document.NewFieldBuffer().
-				Add("age", document.NewInt64Value(10)).
+				Add("age", document.NewIntegerValue(10)).
 				Add("name", document.NewTextValue("john")).
 				Add("address", document.NewDocumentValue(addressMapDoc)),
 			`{"age": 10, "name": "john", "address": {"city": "Ajaccio", "country": "France"}}`,
@@ -139,7 +139,7 @@ func TestDecodeDocument(t *testing.T) {
 	require.NoError(t, err)
 
 	doc := document.NewFieldBuffer().
-		Add("age", document.NewInt64Value(10)).
+		Add("age", document.NewIntegerValue(10)).
 		Add("name", document.NewTextValue("john")).
 		Add("address", document.NewDocumentValue(mapDoc))
 
@@ -149,7 +149,7 @@ func TestDecodeDocument(t *testing.T) {
 	ec := DecodeDocument(data)
 	v, err := ec.GetByField("age")
 	require.NoError(t, err)
-	require.Equal(t, document.NewInt64Value(10), v)
+	require.Equal(t, document.NewIntegerValue(10), v)
 	v, err = ec.GetByField("address")
 	require.NoError(t, err)
 	var expected, actual bytes.Buffer
@@ -163,7 +163,7 @@ func TestDecodeDocument(t *testing.T) {
 	err = ec.Iterate(func(f string, v document.Value) error {
 		switch f {
 		case "age":
-			require.Equal(t, document.NewInt64Value(10), v)
+			require.Equal(t, document.NewIntegerValue(10), v)
 		case "address":
 			var expected, actual bytes.Buffer
 			err = document.ToJSON(&expected, document.NewFieldBuffer().Add("address", document.NewDocumentValue(mapDoc)))
@@ -196,10 +196,10 @@ func TestEncodeArray(t *testing.T) {
 		{
 			"Complex array",
 			document.NewValueBuffer().
-				Append(document.NewInt64Value(10)).
+				Append(document.NewIntegerValue(10)).
 				Append(document.NewTextValue("john")).
 				Append(document.NewDocumentValue(mapDoc)).
-				Append(document.NewArrayValue(document.NewValueBuffer().Append(document.NewInt64Value(11)))),
+				Append(document.NewArrayValue(document.NewValueBuffer().Append(document.NewIntegerValue(11)))),
 			`[10, "john", {"city": "Ajaccio", "country": "France"}, [11]]` + "\n",
 		},
 		{
@@ -224,7 +224,7 @@ func BenchmarkEncodeDocument(b *testing.B) {
 	var buf document.FieldBuffer
 
 	for i := int64(0); i < 100; i++ {
-		buf.Add(fmt.Sprintf("name-%d", i), document.NewInt64Value(i))
+		buf.Add(fmt.Sprintf("name-%d", i), document.NewIntegerValue(i))
 	}
 
 	b.ResetTimer()
@@ -250,7 +250,7 @@ func BenchmarkGetByField(b *testing.B) {
 	var buf document.FieldBuffer
 
 	for i := int64(0); i < 100; i++ {
-		buf.Add(fmt.Sprintf("name-%d", i), document.NewInt64Value(i))
+		buf.Add(fmt.Sprintf("name-%d", i), document.NewIntegerValue(i))
 	}
 
 	data, err := EncodeDocument(&buf)
@@ -266,7 +266,7 @@ func BenchmarkDocumentIterate(b *testing.B) {
 	var buf document.FieldBuffer
 
 	for i := int64(0); i < 100; i++ {
-		buf.Add(fmt.Sprintf("name-%d", i), document.NewInt64Value(i))
+		buf.Add(fmt.Sprintf("name-%d", i), document.NewIntegerValue(i))
 	}
 
 	data, err := EncodeDocument(&buf)
diff --git a/document/json_test.go b/document/json_test.go
index bc61235b..0e4a9428 100644
--- a/document/json_test.go
+++ b/document/json_test.go
@@ -20,15 +20,15 @@ func TestToJSON(t *testing.T) {
 			"Flat",
 			document.NewFieldBuffer().
 				Add("name", document.NewTextValue("John")).
-				Add("age", document.NewInt16Value(10)).
-				Add(`"something with" quotes`, document.NewInt16Value(10)),
+				Add("age", document.NewIntegerValue(10)).
+				Add(`"something with" quotes`, document.NewIntegerValue(10)),
 			`{"name": "John", "age": 10, "\"something with\" quotes": 10}`,
 		},
 		{
 			"Nested",
 			document.NewFieldBuffer().
 				Add("name", document.NewTextValue("John")).
-				Add("age", document.NewInt16Value(10)).
+				Add("age", document.NewIntegerValue(10)).
 				Add("address", document.NewDocumentValue(document.NewFieldBuffer().
 					Add("city", document.NewTextValue("Ajaccio")).
 					Add("country", document.NewTextValue("France")),
diff --git a/document/scan_test.go b/document/scan_test.go
index 08b25797..c713a341 100644
--- a/document/scan_test.go
+++ b/document/scan_test.go
@@ -13,12 +13,12 @@ func TestScan(t *testing.T) {
 		Add("a", document.NewBlobValue([]byte("foo"))).
 		Add("b", document.NewTextValue("bar")).
 		Add("c", document.NewBoolValue(true)).
-		Add("d", document.NewIntValue(10)).
-		Add("e", document.NewInt8Value(10)).
-		Add("f", document.NewInt16Value(10)).
-		Add("g", document.NewInt32Value(10)).
-		Add("h", document.NewInt64Value(10)).
-		Add("i", document.NewFloat64Value(10.5)).
+		Add("d", document.NewIntegerValue(10)).
+		Add("e", document.NewIntegerValue(10)).
+		Add("f", document.NewIntegerValue(10)).
+		Add("g", document.NewIntegerValue(10)).
+		Add("h", document.NewIntegerValue(10)).
+		Add("i", document.NewDoubleValue(10.5)).
 		Add("j", document.NewArrayValue(
 			document.NewValueBuffer().
 				Append(document.NewBoolValue(true)),
@@ -114,7 +114,7 @@ func TestScan(t *testing.T) {
 
 	t.Run("Small Slice", func(t *testing.T) {
 		s := make([]int, 1)
-		arr := document.NewValueBuffer().Append(document.NewInt16Value(1)).Append(document.NewInt16Value(2))
+		arr := document.NewValueBuffer().Append(document.NewIntegerValue(1)).Append(document.NewIntegerValue(2))
 		err := document.SliceScan(arr, &s)
 		require.NoError(t, err)
 		require.Len(t, s, 2)
@@ -123,7 +123,7 @@ func TestScan(t *testing.T) {
 
 	t.Run("Slice overwrite", func(t *testing.T) {
 		s := make([]int, 1)
-		arr := document.NewValueBuffer().Append(document.NewInt16Value(1)).Append(document.NewInt16Value(2))
+		arr := document.NewValueBuffer().Append(document.NewIntegerValue(1)).Append(document.NewIntegerValue(2))
 		err := document.SliceScan(arr, &s)
 		require.NoError(t, err)
 		err = document.SliceScan(arr, &s)
diff --git a/document/value_test.go b/document/value_test.go
index 30d4700c..2cb45fe5 100644
--- a/document/value_test.go
+++ b/document/value_test.go
@@ -20,14 +20,10 @@ func TestValueString(t *testing.T) {
 		{"bytes", document.NewBlobValue([]byte("bar")), "[98 97 114]"},
 		{"string", document.NewTextValue("bar"), "\"bar\""},
 		{"bool", document.NewBoolValue(true), "true"},
-		{"int", document.NewIntValue(10), "10"},
-		{"int8", document.NewInt8Value(10), "10"},
-		{"int16", document.NewInt16Value(10), "10"},
-		{"int32", document.NewInt32Value(10), "10"},
-		{"int64", document.NewInt64Value(10), "10"},
-		{"float64", document.NewFloat64Value(10.1), "10.1"},
-		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), "{\"a\": 10}"},
-		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), "[10]"},
+		{"int", document.NewIntegerValue(10), "10"},
+		{"double", document.NewDoubleValue(10.1), "10.1"},
+		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), "{\"a\": 10}"},
+		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), "[10]"},
 		{"duration", document.NewDurationValue(10 * time.Nanosecond), "10ns"},
 	}
 
@@ -63,32 +59,31 @@ func TestNewValue(t *testing.T) {
 		{"bytes", []byte("bar"), []byte("bar")},
 		{"string", "bar", []byte("bar")},
 		{"bool", true, true},
-		{"uint", uint(10), int8(10)},
-		{"uint8", uint8(10), int8(10)},
-		{"uint16", uint16(10), int8(10)},
-		{"uint16 big", uint16(500), int16(500)},
-		{"uint32", uint32(10), int8(10)},
-		{"uint64", uint64(10), int8(10)},
-		{"int", int(10), int8(10)},
-		{"int8", int8(10), int8(10)},
-		{"int16", int16(10), int8(10)},
-		{"int32", int32(10), int8(10)},
-		{"int64", int64(10), int8(10)},
+		{"uint", uint(10), int64(10)},
+		{"uint8", uint8(10), int64(10)},
+		{"uint16", uint16(10), int64(10)},
+		{"uint32", uint32(10), int64(10)},
+		{"uint64", uint64(10), int64(10)},
+		{"int", int(10), int64(10)},
+		{"int8", int8(10), int64(10)},
+		{"int16", int16(10), int64(10)},
+		{"int32", int32(10), int64(10)},
+		{"int64", int64(10), int64(10)},
 		{"float64", 10.1, float64(10.1)},
 		{"null", nil, nil},
-		{"document", document.NewFieldBuffer().Add("a", document.NewIntValue(10)), document.NewFieldBuffer().Add("a", document.NewIntValue(10))},
-		{"array", document.NewValueBuffer(document.NewIntValue(10)), document.NewValueBuffer(document.NewIntValue(10))},
+		{"document", document.NewFieldBuffer().Add("a", document.NewIntegerValue(10)), document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))},
+		{"array", document.NewValueBuffer(document.NewIntegerValue(10)), document.NewValueBuffer(document.NewIntegerValue(10))},
 		{"duration", 10 * time.Nanosecond, 10 * time.Nanosecond},
 		{"bytes", myBytes("bar"), []byte("bar")},
 		{"string", myString("bar"), []byte("bar")},
-		{"myUint", myUint(10), int8(10)},
-		{"myUint16", myUint16(500), int16(500)},
-		{"myUint32", myUint32(90000), int32(90000)},
-		{"myUint64", myUint64(100), int8(100)},
-		{"myInt", myInt(7), int8(7)},
-		{"myInt8", myInt8(3), int8(3)},
-		{"myInt16", myInt16(500), int16(500)},
-		{"myInt64", myInt64(10), int8(10)},
+		{"myUint", myUint(10), int64(10)},
+		{"myUint16", myUint16(500), int64(500)},
+		{"myUint32", myUint32(90000), int64(90000)},
+		{"myUint64", myUint64(100), int64(100)},
+		{"myInt", myInt(7), int64(7)},
+		{"myInt8", myInt8(3), int64(3)},
+		{"myInt16", myInt16(500), int64(500)},
+		{"myInt64", myInt64(10), int64(10)},
 		{"myFloat64", myFloat64(10.1), float64(10.1)},
 	}
 
@@ -110,16 +105,12 @@ func TestConvertToBlob(t *testing.T) {
 	}{
 		{"null", document.NewNullValue(), false, nil},
 		{"bytes", document.NewBlobValue([]byte("bar")), false, []byte("bar")},
-		{"string", document.NewTextValue("bar"), false, []byte("bar")},
+		{"text", document.NewTextValue("bar"), false, []byte("bar")},
 		{"bool", document.NewBoolValue(true), true, nil},
-		{"int", document.NewIntValue(10), true, nil},
-		{"int8", document.NewInt8Value(10), true, nil},
-		{"int16", document.NewInt16Value(10), true, nil},
-		{"int32", document.NewInt32Value(10), true, nil},
-		{"int64", document.NewInt64Value(10), true, nil},
-		{"float64", document.NewFloat64Value(10.1), true, nil},
-		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), true, nil},
-		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), true, nil},
+		{"integer", document.NewIntegerValue(10), true, nil},
+		{"double", document.NewDoubleValue(10.1), true, nil},
+		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), true, nil},
+		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), true, nil},
 		{"duration", document.NewDurationValue(10 * time.Nanosecond), true, nil},
 	}
 
@@ -145,16 +136,12 @@ func TestConvertToText(t *testing.T) {
 	}{
 		{"null", document.NewNullValue(), false, nil},
 		{"bytes", document.NewBlobValue([]byte("bar")), false, []byte("bar")},
-		{"string", document.NewTextValue("bar"), false, []byte("bar")},
+		{"text", document.NewTextValue("bar"), false, []byte("bar")},
 		{"bool", document.NewBoolValue(true), true, []byte{}},
-		{"int", document.NewIntValue(10), true, []byte{}},
-		{"int8", document.NewInt8Value(10), true, []byte{}},
-		{"int16", document.NewInt16Value(10), true, []byte{}},
-		{"int32", document.NewInt32Value(10), true, []byte{}},
-		{"int64", document.NewInt64Value(10), true, []byte{}},
-		{"float64", document.NewFloat64Value(10.1), true, []byte{}},
-		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), true, []byte{}},
-		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), true, []byte{}},
+		{"integer", document.NewIntegerValue(10), true, []byte{}},
+		{"double", document.NewDoubleValue(10.1), true, []byte{}},
+		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), true, []byte{}},
+		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), true, []byte{}},
 		{"duration", document.NewDurationValue(10 * time.Nanosecond), true, []byte{}},
 	}
 
@@ -181,25 +168,17 @@ func TestConvertToBool(t *testing.T) {
 		{"null", document.NewNullValue(), false, nil},
 		{"bytes", document.NewBlobValue([]byte("bar")), false, true},
 		{"zero bytes", document.NewBlobValue([]byte("")), false, false},
-		{"string", document.NewTextValue("bar"), false, true},
-		{"zero string", document.NewTextValue(""), false, false},
+		{"text", document.NewTextValue("bar"), false, true},
+		{"zero text", document.NewTextValue(""), false, false},
 		{"bool", document.NewBoolValue(true), false, true},
 		{"zero bool", document.NewBoolValue(false), false, false},
-		{"int", document.NewIntValue(10), false, true},
-		{"zero int", document.NewIntValue(0), false, false},
-		{"int8", document.NewInt8Value(10), false, true},
-		{"zero int8", document.NewInt8Value(0), false, false},
-		{"int16", document.NewInt16Value(10), false, true},
-		{"zero int16", document.NewInt16Value(0), false, false},
-		{"int32", document.NewInt32Value(10), false, true},
-		{"zero int32", document.NewInt32Value(0), false, false},
-		{"int64", document.NewInt64Value(10), false, true},
-		{"zero int64", document.NewInt64Value(0), false, false},
-		{"float64", document.NewFloat64Value(10.1), false, true},
-		{"zero float64", document.NewFloat64Value(0), false, false},
+		{"integer", document.NewIntegerValue(10), false, true},
+		{"zero integer", document.NewIntegerValue(0), false, false},
+		{"double", document.NewDoubleValue(10.1), false, true},
+		{"zero double", document.NewDoubleValue(0), false, false},
 		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewBoolValue(true))), false, true},
 		{"zero document", document.NewDocumentValue(document.NewFieldBuffer()), false, false},
-		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewInt16Value(1))), false, true},
+		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(1))), false, true},
 		{"zero array", document.NewArrayValue(document.NewValueBuffer()), false, false},
 		{"duration", document.NewDurationValue(10 * time.Nanosecond), false, true},
 		{"zero duration", document.NewDurationValue(0), false, false},
@@ -227,16 +206,12 @@ func TestConvertToNumber(t *testing.T) {
 	}{
 		{"null", document.NewNullValue(), false, nil},
 		{"bytes", document.NewBlobValue([]byte("bar")), true, 0},
-		{"string", document.NewTextValue("bar"), true, 0},
+		{"text", document.NewTextValue("bar"), true, 0},
 		{"bool", document.NewBoolValue(true), false, 1},
-		{"int", document.NewIntValue(10), false, 10},
-		{"int8", document.NewInt8Value(10), false, 10},
-		{"int16", document.NewInt16Value(10), false, 10},
-		{"int32", document.NewInt32Value(10), false, 10},
-		{"int64", document.NewInt64Value(10), false, 10},
-		{"float64", document.NewFloat64Value(10), false, 10},
-		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), true, 0},
-		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), true, 0},
+		{"integer", document.NewIntegerValue(10), false, 10},
+		{"double", document.NewDoubleValue(10), false, 10},
+		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), true, 0},
+		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), true, 0},
 		{"duration", document.NewDurationValue(10 * time.Nanosecond), false, 10},
 	}
 
@@ -250,16 +225,16 @@ func TestConvertToNumber(t *testing.T) {
 	}
 
 	for _, test := range tests {
-		t.Run(test.name+" to int64", func(t *testing.T) {
-			res, err := test.v.ConvertTo(document.Int64Value)
+		t.Run(test.name+" to integer", func(t *testing.T) {
+			res, err := test.v.ConvertTo(document.IntegerValue)
 			expected := test.expected
 			if expected != nil {
 				expected = int64(expected.(int))
 			}
 			check(t, res, err, test.fails, expected)
 		})
-		t.Run(test.name+" to float64", func(t *testing.T) {
-			res, err := test.v.ConvertTo(document.Float64Value)
+		t.Run(test.name+" to double", func(t *testing.T) {
+			res, err := test.v.ConvertTo(document.DoubleValue)
 			expected := test.expected
 			if expected != nil {
 				expected = float64(expected.(int))
@@ -268,30 +243,17 @@ func TestConvertToNumber(t *testing.T) {
 		})
 	}
 
-	t.Run("float64/precision loss", func(t *testing.T) {
-		_, err := document.NewFloat64Value(10.4).ConvertTo(document.Int64Value)
+	t.Run("double/precision loss", func(t *testing.T) {
+		_, err := document.NewDoubleValue(10.4).ConvertTo(document.IntegerValue)
 		require.Error(t, err)
-		_, err = document.NewFloat64Value(10.4).ConvertTo(document.Int32Value)
+		_, err = document.NewDoubleValue(10.4).ConvertTo(document.IntegerValue)
 		require.Error(t, err)
-	})
 
-	t.Run("ints/overflow", func(t *testing.T) {
-		tests := []struct {
-			from, to document.ValueType
-			x        interface{}
-		}{
-			{document.Float64Value, document.Int64Value, float64(math.MaxFloat64)},
-			{document.Int16Value, document.Int8Value, int16(math.MaxInt16)},
-			{document.Int32Value, document.Int16Value, int32(math.MaxInt32)},
-			{document.Int64Value, document.Int32Value, int64(math.MaxInt64)},
-		}
+	})
 
-		for _, test := range tests {
-			t.Run(fmt.Sprintf("%s/%s", test.from, test.to), func(t *testing.T) {
-				_, err := document.Value{Type: test.from, V: test.x}.ConvertTo(test.to)
-				require.Error(t, err)
-			})
-		}
+	t.Run("double/overflow", func(t *testing.T) {
+		_, err := document.NewDoubleValue(math.MaxFloat64).ConvertTo(document.IntegerValue)
+		require.Error(t, err)
 	})
 }
 
@@ -307,14 +269,14 @@ func TestConvertToDuration(t *testing.T) {
 		{"string", document.NewTextValue("1ms"), false, time.Millisecond},
 		{"bad string", document.NewTextValue("foo"), true, 0},
 		{"bool", document.NewBoolValue(true), false, time.Nanosecond},
-		{"int", document.NewIntValue(10), false, 10 * time.Nanosecond},
-		{"int8", document.NewInt8Value(10), false, 10 * time.Nanosecond},
-		{"int16", document.NewInt16Value(10), false, 10 * time.Nanosecond},
-		{"int32", document.NewInt32Value(10), false, 10 * time.Nanosecond},
-		{"int64", document.NewInt64Value(10), false, 10 * time.Nanosecond},
-		{"float64", document.NewFloat64Value(10), false, 10 * time.Nanosecond},
-		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), true, 0},
-		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), true, 0},
+		{"int", document.NewIntegerValue(10), false, 10 * time.Nanosecond},
+		{"int8", document.NewIntegerValue(10), false, 10 * time.Nanosecond},
+		{"int16", document.NewIntegerValue(10), false, 10 * time.Nanosecond},
+		{"int32", document.NewIntegerValue(10), false, 10 * time.Nanosecond},
+		{"int64", document.NewIntegerValue(10), false, 10 * time.Nanosecond},
+		{"double", document.NewDoubleValue(10), false, 10 * time.Nanosecond},
+		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), true, 0},
+		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), true, 0},
 	}
 
 	for _, test := range tests {
@@ -338,17 +300,17 @@ func TestConvertToDocument(t *testing.T) {
 		expected document.Value
 	}{
 		{"null", document.NewNullValue(), false, document.NewNullValue()},
-		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewInt16Value(10))), false, document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewInt16Value(10)))},
+		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), false, document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10)))},
 		{"bytes", document.NewBlobValue([]byte("bar")), true, document.Value{}},
 		{"string", document.NewTextValue("bar"), true, document.Value{}},
 		{"bool", document.NewBoolValue(true), true, document.Value{}},
-		{"int", document.NewIntValue(10), true, document.Value{}},
-		{"int8", document.NewInt8Value(10), true, document.Value{}},
-		{"int16", document.NewInt16Value(10), true, document.Value{}},
-		{"int32", document.NewInt32Value(10), true, document.Value{}},
-		{"int64", document.NewInt64Value(10), true, document.Value{}},
-		{"float64", document.NewFloat64Value(10), true, document.Value{}},
-		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), true, document.Value{}},
+		{"int", document.NewIntegerValue(10), true, document.Value{}},
+		{"int8", document.NewIntegerValue(10), true, document.Value{}},
+		{"int16", document.NewIntegerValue(10), true, document.Value{}},
+		{"int32", document.NewIntegerValue(10), true, document.Value{}},
+		{"int64", document.NewIntegerValue(10), true, document.Value{}},
+		{"double", document.NewDoubleValue(10), true, document.Value{}},
+		{"array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), true, document.Value{}},
 		{"duration", document.NewDurationValue(10 * time.Nanosecond), true, document.Value{}},
 	}
 
@@ -373,17 +335,17 @@ func TestConvertToArray(t *testing.T) {
 		expected document.Array
 	}{
 		{"null", document.NewNullValue(), false, document.NewValueBuffer()},
-		{"array", document.NewArrayValue(document.NewValueBuffer().Append(document.NewInt16Value(10))), false, document.NewValueBuffer().Append(document.NewInt16Value(10))},
+		{"array", document.NewArrayValue(document.NewValueBuffer().Append(document.NewIntegerValue(10))), false, document.NewValueBuffer().Append(document.NewIntegerValue(10))},
 		{"bytes", document.NewBlobValue([]byte("bar")), true, nil},
 		{"string", document.NewTextValue("bar"), true, nil},
 		{"bool", document.NewBoolValue(true), true, nil},
-		{"int", document.NewIntValue(10), true, nil},
-		{"int8", document.NewInt8Value(10), true, nil},
-		{"int16", document.NewInt16Value(10), true, nil},
-		{"int32", document.NewInt32Value(10), true, nil},
-		{"int64", document.NewInt64Value(10), true, nil},
-		{"float64", document.NewFloat64Value(10), true, nil},
-		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), true, nil},
+		{"int", document.NewIntegerValue(10), true, nil},
+		{"int8", document.NewIntegerValue(10), true, nil},
+		{"int16", document.NewIntegerValue(10), true, nil},
+		{"int32", document.NewIntegerValue(10), true, nil},
+		{"int64", document.NewIntegerValue(10), true, nil},
+		{"double", document.NewDoubleValue(10), true, nil},
+		{"document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), true, nil},
 		{"duration", document.NewDurationValue(10 * time.Nanosecond), true, nil},
 	}
 
@@ -407,20 +369,20 @@ func TestValueAdd(t *testing.T) {
 		fails          bool
 	}{
 		{"null+null", document.NewNullValue(), document.NewNullValue(), document.NewNullValue(), false},
-		{"null+int8(10)", document.NewNullValue(), document.NewInt8Value(10), document.NewNullValue(), false},
-		{"bool(true)+bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewInt8Value(2), false},
-		{"bool(true)+bool(false)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewInt8Value(2), false},
-		{"bool(true)+int8(-10)", document.NewBoolValue(true), document.NewInt8Value(-10), document.NewInt8Value(-9), false},
-		{"int8(-10)+int8(10)", document.NewInt8Value(-10), document.NewInt8Value(10), document.NewInt8Value(0), false},
-		{"int8(120)+int8(120)", document.NewInt8Value(120), document.NewInt8Value(120), document.NewInt16Value(240), false},
-		{"int8(120)+float64(120)", document.NewInt8Value(120), document.NewFloat64Value(120), document.NewFloat64Value(240), false},
-		{"int8(120)+float64(120.1)", document.NewInt8Value(120), document.NewFloat64Value(120.1), document.NewFloat64Value(240.1), false},
-		{"int64(max)+int8(10)", document.NewInt64Value(math.MaxInt64), document.NewIntValue(10), document.NewFloat64Value(math.MaxInt64 + 10), false},
-		{"int64(min)+int8(-10)", document.NewInt64Value(math.MinInt64), document.NewIntValue(-10), document.NewFloat64Value(math.MinInt64 - 10), false},
-		{"int8(120)+text('120')", document.NewInt8Value(120), document.NewTextValue("120"), document.NewNullValue(), false},
+		{"null+integer(10)", document.NewNullValue(), document.NewIntegerValue(10), document.NewNullValue(), false},
+		{"bool(true)+bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewIntegerValue(2), false},
+		{"bool(true)+bool(false)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewIntegerValue(2), false},
+		{"bool(true)+integer(-10)", document.NewBoolValue(true), document.NewIntegerValue(-10), document.NewIntegerValue(-9), false},
+		{"integer(-10)+integer(10)", document.NewIntegerValue(-10), document.NewIntegerValue(10), document.NewIntegerValue(0), false},
+		{"integer(120)+integer(120)", document.NewIntegerValue(120), document.NewIntegerValue(120), document.NewIntegerValue(240), false},
+		{"integer(120)+float64(120)", document.NewIntegerValue(120), document.NewDoubleValue(120), document.NewDoubleValue(240), false},
+		{"integer(120)+float64(120.1)", document.NewIntegerValue(120), document.NewDoubleValue(120.1), document.NewDoubleValue(240.1), false},
+		{"int64(max)+integer(10)", document.NewIntegerValue(math.MaxInt64), document.NewIntegerValue(10), document.NewDoubleValue(math.MaxInt64 + 10), false},
+		{"int64(min)+integer(-10)", document.NewIntegerValue(math.MinInt64), document.NewIntegerValue(-10), document.NewDoubleValue(math.MinInt64 - 10), false},
+		{"integer(120)+text('120')", document.NewIntegerValue(120), document.NewTextValue("120"), document.NewNullValue(), false},
 		{"text('120')+text('120')", document.NewTextValue("120"), document.NewTextValue("120"), document.NewNullValue(), false},
-		{"document+document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewNullValue(), false},
-		{"array+array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewNullValue(), false},
+		{"document+document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewNullValue(), false},
+		{"array+array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewNullValue(), false},
 		{"duration(1ns)+duration(1ms)", document.NewDurationValue(time.Nanosecond), document.NewDurationValue(time.Millisecond), document.NewDurationValue(time.Nanosecond + time.Millisecond), false},
 	}
 
@@ -444,20 +406,20 @@ func TestValueSub(t *testing.T) {
 		fails          bool
 	}{
 		{"null-null", document.NewNullValue(), document.NewNullValue(), document.NewNullValue(), false},
-		{"null-int8(10)", document.NewNullValue(), document.NewInt8Value(10), document.NewNullValue(), false},
-		{"bool(true)-bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewInt8Value(0), false},
-		{"bool(true)-bool(false)", document.NewBoolValue(true), document.NewBoolValue(false), document.NewInt8Value(1), false},
-		{"bool(true)-int8(-10)", document.NewBoolValue(true), document.NewInt8Value(-10), document.NewInt8Value(11), false},
-		{"int8(10)-int8(10)", document.NewInt8Value(10), document.NewInt8Value(10), document.NewInt8Value(0), false},
-		{"int16(250)-int16(220)", document.NewInt16Value(250), document.NewInt16Value(220), document.NewInt8Value(30), false},
-		{"int8(120)-float64(620)", document.NewInt8Value(120), document.NewFloat64Value(620), document.NewFloat64Value(-500), false},
-		{"int8(120)-float64(120.1)", document.NewInt8Value(120), document.NewFloat64Value(120.1), document.NewFloat64Value(-0.09999999999999432), false},
-		{"int64(min)-int8(10)", document.NewInt64Value(math.MinInt64), document.NewIntValue(10), document.NewFloat64Value(math.MinInt64 - 10), false},
-		{"int64(max)-int8(-10)", document.NewInt64Value(math.MaxInt64), document.NewIntValue(-10), document.NewFloat64Value(math.MaxInt64 + 10), false},
-		{"int8(120)-text('120')", document.NewInt8Value(120), document.NewTextValue("120"), document.NewNullValue(), false},
+		{"null-integer(10)", document.NewNullValue(), document.NewIntegerValue(10), document.NewNullValue(), false},
+		{"bool(true)-bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewIntegerValue(0), false},
+		{"bool(true)-bool(false)", document.NewBoolValue(true), document.NewBoolValue(false), document.NewIntegerValue(1), false},
+		{"bool(true)-integer(-10)", document.NewBoolValue(true), document.NewIntegerValue(-10), document.NewIntegerValue(11), false},
+		{"integer(10)-integer(10)", document.NewIntegerValue(10), document.NewIntegerValue(10), document.NewIntegerValue(0), false},
+		{"int16(250)-int16(220)", document.NewIntegerValue(250), document.NewIntegerValue(220), document.NewIntegerValue(30), false},
+		{"integer(120)-float64(620)", document.NewIntegerValue(120), document.NewDoubleValue(620), document.NewDoubleValue(-500), false},
+		{"integer(120)-float64(120.1)", document.NewIntegerValue(120), document.NewDoubleValue(120.1), document.NewDoubleValue(-0.09999999999999432), false},
+		{"int64(min)-integer(10)", document.NewIntegerValue(math.MinInt64), document.NewIntegerValue(10), document.NewDoubleValue(math.MinInt64 - 10), false},
+		{"int64(max)-integer(-10)", document.NewIntegerValue(math.MaxInt64), document.NewIntegerValue(-10), document.NewDoubleValue(math.MaxInt64 + 10), false},
+		{"integer(120)-text('120')", document.NewIntegerValue(120), document.NewTextValue("120"), document.NewNullValue(), false},
 		{"text('120')-text('120')", document.NewTextValue("120"), document.NewTextValue("120"), document.NewNullValue(), false},
-		{"document-document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewNullValue(), false},
-		{"array-array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewNullValue(), false},
+		{"document-document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewNullValue(), false},
+		{"array-array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewNullValue(), false},
 		{"duration(1ns)-duration(1ms)", document.NewDurationValue(time.Nanosecond), document.NewDurationValue(time.Millisecond), document.NewDurationValue(time.Nanosecond - time.Millisecond), false},
 	}
 
@@ -481,18 +443,18 @@ func TestValueMult(t *testing.T) {
 		fails          bool
 	}{
 		{"null*null", document.NewNullValue(), document.NewNullValue(), document.NewNullValue(), false},
-		{"null*int8(10)", document.NewNullValue(), document.NewInt8Value(10), document.NewNullValue(), false},
-		{"bool(true)*bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewInt8Value(1), false},
-		{"bool(true)*bool(false)", document.NewBoolValue(true), document.NewBoolValue(false), document.NewInt8Value(0), false},
-		{"bool(true)*int8(-10)", document.NewBoolValue(true), document.NewInt8Value(-10), document.NewInt8Value(-10), false},
-		{"int8(10)*int8(10)", document.NewInt8Value(10), document.NewInt8Value(10), document.NewInt8Value(100), false},
-		{"int8(10)*int8(80)", document.NewInt8Value(10), document.NewInt8Value(80), document.NewInt16Value(800), false},
-		{"int8(10)*float64(80)", document.NewInt8Value(10), document.NewFloat64Value(80), document.NewFloat64Value(800), false},
-		{"int64(max)*int64(max)", document.NewInt64Value(math.MaxInt64), document.NewInt64Value(math.MaxInt64), document.NewFloat64Value(math.MaxInt64 * math.MaxInt64), false},
-		{"int8(120)*text('120')", document.NewInt8Value(120), document.NewTextValue("120"), document.NewNullValue(), false},
+		{"null*integer(10)", document.NewNullValue(), document.NewIntegerValue(10), document.NewNullValue(), false},
+		{"bool(true)*bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewIntegerValue(1), false},
+		{"bool(true)*bool(false)", document.NewBoolValue(true), document.NewBoolValue(false), document.NewIntegerValue(0), false},
+		{"bool(true)*integer(-10)", document.NewBoolValue(true), document.NewIntegerValue(-10), document.NewIntegerValue(-10), false},
+		{"integer(10)*integer(10)", document.NewIntegerValue(10), document.NewIntegerValue(10), document.NewIntegerValue(100), false},
+		{"integer(10)*integer(80)", document.NewIntegerValue(10), document.NewIntegerValue(80), document.NewIntegerValue(800), false},
+		{"integer(10)*float64(80)", document.NewIntegerValue(10), document.NewDoubleValue(80), document.NewDoubleValue(800), false},
+		{"int64(max)*int64(max)", document.NewIntegerValue(math.MaxInt64), document.NewIntegerValue(math.MaxInt64), document.NewDoubleValue(math.MaxInt64 * math.MaxInt64), false},
+		{"integer(120)*text('120')", document.NewIntegerValue(120), document.NewTextValue("120"), document.NewNullValue(), false},
 		{"text('120')*text('120')", document.NewTextValue("120"), document.NewTextValue("120"), document.NewNullValue(), false},
-		{"document*document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewNullValue(), false},
-		{"array*array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewNullValue(), false},
+		{"document*document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewNullValue(), false},
+		{"array*array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewNullValue(), false},
 		{"duration(10ns)*duration(1ms)", document.NewDurationValue(10 * time.Nanosecond), document.NewDurationValue(time.Millisecond), document.NewDurationValue(10 * time.Nanosecond * time.Millisecond), false},
 	}
 
@@ -516,19 +478,19 @@ func TestValueDiv(t *testing.T) {
 		fails          bool
 	}{
 		{"null/null", document.NewNullValue(), document.NewNullValue(), document.NewNullValue(), false},
-		{"null/int8(10)", document.NewNullValue(), document.NewInt8Value(10), document.NewNullValue(), false},
-		{"bool(true)/bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewInt8Value(1), false},
+		{"null/integer(10)", document.NewNullValue(), document.NewIntegerValue(10), document.NewNullValue(), false},
+		{"bool(true)/bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewIntegerValue(1), false},
 		{"bool(true)/bool(false)", document.NewBoolValue(true), document.NewBoolValue(false), document.NewNullValue(), false},
-		{"int8(10)/int8(0)", document.NewInt8Value(10), document.NewInt8Value(0), document.NewNullValue(), false},
-		{"int8(10)/float64(0)", document.NewInt8Value(10), document.NewFloat64Value(0), document.NewNullValue(), false},
-		{"int8(10)/int8(10)", document.NewInt8Value(10), document.NewInt8Value(10), document.NewInt8Value(1), false},
-		{"int8(10)/int8(8)", document.NewInt8Value(10), document.NewInt8Value(8), document.NewInt8Value(1), false},
-		{"int8(10)/float64(8)", document.NewInt8Value(10), document.NewFloat64Value(8), document.NewFloat64Value(1.25), false},
-		{"int64(maxint)/float64(maxint)", document.NewInt64Value(math.MaxInt64), document.NewFloat64Value(math.MaxInt64), document.NewFloat64Value(1), false},
-		{"int8(120)/text('120')", document.NewInt8Value(120), document.NewTextValue("120"), document.NewNullValue(), false},
+		{"integer(10)/integer(0)", document.NewIntegerValue(10), document.NewIntegerValue(0), document.NewNullValue(), false},
+		{"integer(10)/float64(0)", document.NewIntegerValue(10), document.NewDoubleValue(0), document.NewNullValue(), false},
+		{"integer(10)/integer(10)", document.NewIntegerValue(10), document.NewIntegerValue(10), document.NewIntegerValue(1), false},
+		{"integer(10)/integer(8)", document.NewIntegerValue(10), document.NewIntegerValue(8), document.NewIntegerValue(1), false},
+		{"integer(10)/float64(8)", document.NewIntegerValue(10), document.NewDoubleValue(8), document.NewDoubleValue(1.25), false},
+		{"int64(maxint)/float64(maxint)", document.NewIntegerValue(math.MaxInt64), document.NewDoubleValue(math.MaxInt64), document.NewDoubleValue(1), false},
+		{"integer(120)/text('120')", document.NewIntegerValue(120), document.NewTextValue("120"), document.NewNullValue(), false},
 		{"text('120')/text('120')", document.NewTextValue("120"), document.NewTextValue("120"), document.NewNullValue(), false},
-		{"document/document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewNullValue(), false},
-		{"array/array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewNullValue(), false},
+		{"document/document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewNullValue(), false},
+		{"array/array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewNullValue(), false},
 		{"duration(10ns)/duration(1ms)", document.NewDurationValue(10 * time.Nanosecond), document.NewDurationValue(time.Millisecond), document.NewDurationValue(10 * time.Nanosecond / time.Millisecond), false},
 	}
 
@@ -552,21 +514,21 @@ func TestValueMod(t *testing.T) {
 		fails          bool
 	}{
 		{"null%null", document.NewNullValue(), document.NewNullValue(), document.NewNullValue(), false},
-		{"null%int8(10)", document.NewNullValue(), document.NewInt8Value(10), document.NewNullValue(), false},
-		{"bool(true)%bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewInt8Value(0), false},
+		{"null%integer(10)", document.NewNullValue(), document.NewIntegerValue(10), document.NewNullValue(), false},
+		{"bool(true)%bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewIntegerValue(0), false},
 		{"bool(true)%bool(false)", document.NewBoolValue(true), document.NewBoolValue(false), document.NewNullValue(), false},
-		{"int8(10)%int8(0)", document.NewInt8Value(10), document.NewInt8Value(0), document.NewNullValue(), false},
-		{"int8(10)%float64(0)", document.NewInt8Value(10), document.NewFloat64Value(0), document.NewNullValue(), false},
-		{"int8(10)%int8(10)", document.NewInt8Value(10), document.NewInt8Value(10), document.NewInt8Value(0), false},
-		{"int8(10)%int8(8)", document.NewInt8Value(10), document.NewInt8Value(8), document.NewInt8Value(2), false},
-		{"int8(10)%float64(8)", document.NewInt8Value(10), document.NewFloat64Value(8), document.NewFloat64Value(2), false},
-		{"int64(maxint)%float64(maxint)", document.NewInt64Value(math.MaxInt64), document.NewFloat64Value(math.MaxInt64), document.NewFloat64Value(0), false},
-		{"float64(> maxint)%int64(100)", document.NewFloat64Value(math.MaxInt64 + 1000), document.NewInt8Value(100), document.NewFloat64Value(-8), false},
-		{"int64(100)%float64(> maxint)", document.NewInt8Value(100), document.NewFloat64Value(math.MaxInt64 + 1000), document.NewFloat64Value(100), false},
-		{"int8(120)%text('120')", document.NewInt8Value(120), document.NewTextValue("120"), document.NewNullValue(), false},
+		{"integer(10)%integer(0)", document.NewIntegerValue(10), document.NewIntegerValue(0), document.NewNullValue(), false},
+		{"integer(10)%float64(0)", document.NewIntegerValue(10), document.NewDoubleValue(0), document.NewNullValue(), false},
+		{"integer(10)%integer(10)", document.NewIntegerValue(10), document.NewIntegerValue(10), document.NewIntegerValue(0), false},
+		{"integer(10)%integer(8)", document.NewIntegerValue(10), document.NewIntegerValue(8), document.NewIntegerValue(2), false},
+		{"integer(10)%float64(8)", document.NewIntegerValue(10), document.NewDoubleValue(8), document.NewDoubleValue(2), false},
+		{"int64(maxint)%float64(maxint)", document.NewIntegerValue(math.MaxInt64), document.NewDoubleValue(math.MaxInt64), document.NewDoubleValue(0), false},
+		{"double(> maxint)%int64(100)", document.NewDoubleValue(math.MaxInt64 + 1000), document.NewIntegerValue(100), document.NewDoubleValue(-8), false},
+		{"int64(100)%float64(> maxint)", document.NewIntegerValue(100), document.NewDoubleValue(math.MaxInt64 + 1000), document.NewDoubleValue(100), false},
+		{"integer(120)%text('120')", document.NewIntegerValue(120), document.NewTextValue("120"), document.NewNullValue(), false},
 		{"text('120')%text('120')", document.NewTextValue("120"), document.NewTextValue("120"), document.NewNullValue(), false},
-		{"document%document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewNullValue(), false},
-		{"array%array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewNullValue(), false},
+		{"document%document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewNullValue(), false},
+		{"array%array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewNullValue(), false},
 		{"duration(10ns)%duration(1ms)", document.NewDurationValue(10 * time.Nanosecond), document.NewDurationValue(time.Millisecond), document.NewDurationValue(10 * time.Nanosecond % time.Millisecond), false},
 	}
 
@@ -590,19 +552,19 @@ func TestValueBitwiseAnd(t *testing.T) {
 		fails          bool
 	}{
 		{"null&null", document.NewNullValue(), document.NewNullValue(), document.NewNullValue(), false},
-		{"null&int8(10)", document.NewNullValue(), document.NewInt8Value(10), document.NewNullValue(), false},
-		{"bool(true)&bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewInt8Value(1), false},
-		{"bool(true)&bool(false)", document.NewBoolValue(true), document.NewBoolValue(false), document.NewInt8Value(0), false},
-		{"int8(10)&int8(0)", document.NewInt8Value(10), document.NewInt8Value(0), document.NewInt8Value(0), false},
-		{"float64(10.5)&float64(3.2)", document.NewFloat64Value(10.5), document.NewFloat64Value(3.2), document.NewInt8Value(2), false},
-		{"int8(10)&float64(0)", document.NewInt8Value(10), document.NewFloat64Value(0), document.NewInt8Value(0), false},
-		{"int8(10)&int8(10)", document.NewInt8Value(10), document.NewInt8Value(10), document.NewInt8Value(10), false},
-		{"int8(10)&int8(8)", document.NewInt8Value(10), document.NewInt8Value(8), document.NewInt8Value(8), false},
-		{"int8(10)&float64(8)", document.NewInt8Value(10), document.NewFloat64Value(8), document.NewInt8Value(8), false},
+		{"null&integer(10)", document.NewNullValue(), document.NewIntegerValue(10), document.NewNullValue(), false},
+		{"bool(true)&bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewIntegerValue(1), false},
+		{"bool(true)&bool(false)", document.NewBoolValue(true), document.NewBoolValue(false), document.NewIntegerValue(0), false},
+		{"integer(10)&integer(0)", document.NewIntegerValue(10), document.NewIntegerValue(0), document.NewIntegerValue(0), false},
+		{"double(10.5)&float64(3.2)", document.NewDoubleValue(10.5), document.NewDoubleValue(3.2), document.NewIntegerValue(2), false},
+		{"integer(10)&float64(0)", document.NewIntegerValue(10), document.NewDoubleValue(0), document.NewIntegerValue(0), false},
+		{"integer(10)&integer(10)", document.NewIntegerValue(10), document.NewIntegerValue(10), document.NewIntegerValue(10), false},
+		{"integer(10)&integer(8)", document.NewIntegerValue(10), document.NewIntegerValue(8), document.NewIntegerValue(8), false},
+		{"integer(10)&float64(8)", document.NewIntegerValue(10), document.NewDoubleValue(8), document.NewIntegerValue(8), false},
 		{"text('120')&text('120')", document.NewTextValue("120"), document.NewTextValue("120"), document.NewNullValue(), false},
-		{"document&document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewNullValue(), false},
-		{"array&array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewNullValue(), false},
-		{"duration(10ns)&duration(1ms)", document.NewDurationValue(10 * time.Nanosecond), document.NewDurationValue(time.Microsecond), document.NewIntValue(8), false},
+		{"document&document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewNullValue(), false},
+		{"array&array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewNullValue(), false},
+		{"duration(10ns)&duration(1ms)", document.NewDurationValue(10 * time.Nanosecond), document.NewDurationValue(time.Microsecond), document.NewIntegerValue(8), false},
 	}
 
 	for _, test := range tests {
@@ -625,18 +587,18 @@ func TestValueBitwiseOr(t *testing.T) {
 		fails          bool
 	}{
 		{"null|null", document.NewNullValue(), document.NewNullValue(), document.NewNullValue(), false},
-		{"null|int8(10)", document.NewNullValue(), document.NewInt8Value(10), document.NewNullValue(), false},
-		{"bool(true)|bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewInt8Value(1), false},
-		{"bool(true)|bool(false)", document.NewBoolValue(true), document.NewBoolValue(false), document.NewInt8Value(1), false},
-		{"int8(10)|int8(0)", document.NewInt8Value(10), document.NewInt8Value(0), document.NewInt8Value(10), false},
-		{"float64(10.5)|float64(3.2)", document.NewFloat64Value(10.5), document.NewFloat64Value(3.2), document.NewInt8Value(11), false},
-		{"int8(10)|float64(0)", document.NewInt8Value(10), document.NewFloat64Value(0), document.NewInt8Value(10), false},
-		{"int8(10)|int8(10)", document.NewInt8Value(10), document.NewInt8Value(10), document.NewInt8Value(10), false},
-		{"int8(10)|float64(8)", document.NewInt8Value(10), document.NewFloat64Value(8), document.NewInt8Value(10), false},
+		{"null|integer(10)", document.NewNullValue(), document.NewIntegerValue(10), document.NewNullValue(), false},
+		{"bool(true)|bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewIntegerValue(1), false},
+		{"bool(true)|bool(false)", document.NewBoolValue(true), document.NewBoolValue(false), document.NewIntegerValue(1), false},
+		{"integer(10)|integer(0)", document.NewIntegerValue(10), document.NewIntegerValue(0), document.NewIntegerValue(10), false},
+		{"double(10.5)|float64(3.2)", document.NewDoubleValue(10.5), document.NewDoubleValue(3.2), document.NewIntegerValue(11), false},
+		{"integer(10)|float64(0)", document.NewIntegerValue(10), document.NewDoubleValue(0), document.NewIntegerValue(10), false},
+		{"integer(10)|integer(10)", document.NewIntegerValue(10), document.NewIntegerValue(10), document.NewIntegerValue(10), false},
+		{"integer(10)|float64(8)", document.NewIntegerValue(10), document.NewDoubleValue(8), document.NewIntegerValue(10), false},
 		{"text('120')|text('120')", document.NewTextValue("120"), document.NewTextValue("120"), document.NewNullValue(), false},
-		{"document|document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewNullValue(), false},
-		{"array|array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewNullValue(), false},
-		{"duration(10ns)|duration(1ms)", document.NewDurationValue(10 * time.Nanosecond), document.NewDurationValue(time.Microsecond), document.NewIntValue(1002), false},
+		{"document|document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewNullValue(), false},
+		{"array|array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewNullValue(), false},
+		{"duration(10ns)|duration(1ms)", document.NewDurationValue(10 * time.Nanosecond), document.NewDurationValue(time.Microsecond), document.NewIntegerValue(1002), false},
 	}
 
 	for _, test := range tests {
@@ -659,17 +621,17 @@ func TestValueBitwiseXor(t *testing.T) {
 		fails          bool
 	}{
 		{"null^null", document.NewNullValue(), document.NewNullValue(), document.NewNullValue(), false},
-		{"null^int8(10)", document.NewNullValue(), document.NewInt8Value(10), document.NewNullValue(), false},
-		{"bool(true)^bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewInt8Value(0), false},
-		{"bool(true)^bool(false)", document.NewBoolValue(true), document.NewBoolValue(false), document.NewInt8Value(1), false},
-		{"int8(10)^int8(0)", document.NewInt8Value(10), document.NewInt8Value(0), document.NewInt8Value(10), false},
-		{"float64(10.5)^float64(3.2)", document.NewFloat64Value(10.5), document.NewFloat64Value(3.2), document.NewInt8Value(9), false},
-		{"int8(10)^float64(0)", document.NewInt8Value(10), document.NewFloat64Value(0), document.NewInt8Value(10), false},
-		{"int8(10)^int8(10)", document.NewInt8Value(10), document.NewInt8Value(10), document.NewInt8Value(0), false},
+		{"null^integer(10)", document.NewNullValue(), document.NewIntegerValue(10), document.NewNullValue(), false},
+		{"bool(true)^bool(true)", document.NewBoolValue(true), document.NewBoolValue(true), document.NewIntegerValue(0), false},
+		{"bool(true)^bool(false)", document.NewBoolValue(true), document.NewBoolValue(false), document.NewIntegerValue(1), false},
+		{"integer(10)^integer(0)", document.NewIntegerValue(10), document.NewIntegerValue(0), document.NewIntegerValue(10), false},
+		{"double(10.5)^double(3.2)", document.NewDoubleValue(10.5), document.NewDoubleValue(3.2), document.NewIntegerValue(9), false},
+		{"integer(10)^double(0)", document.NewIntegerValue(10), document.NewDoubleValue(0), document.NewIntegerValue(10), false},
+		{"integer(10)^integer(10)", document.NewIntegerValue(10), document.NewIntegerValue(10), document.NewIntegerValue(0), false},
 		{"text('120')^text('120')", document.NewTextValue("120"), document.NewTextValue("120"), document.NewNullValue(), false},
-		{"document^document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntValue(10))), document.NewNullValue(), false},
-		{"array^array", document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntValue(10))), document.NewNullValue(), false},
-		{"duration(10ns)^duration(1ms)", document.NewDurationValue(10 * time.Nanosecond), document.NewDurationValue(time.Microsecond), document.NewIntValue(994), false},
+		{"document^document", document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewDocumentValue(document.NewFieldBuffer().Add("a", document.NewIntegerValue(10))), document.NewNullValue(), false},
+		{"array^array", document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewArrayValue(document.NewValueBuffer(document.NewIntegerValue(10))), document.NewNullValue(), false},
+		{"duration(10ns)^duration(1ms)", document.NewDurationValue(10 * time.Nanosecond), document.NewDurationValue(time.Microsecond), document.NewIntegerValue(994), false},
 	}
 
 	for _, test := range tests {
@@ -694,8 +656,8 @@ type CompareTest struct {
 func TestValueCompare(t *testing.T) {
 	tests := []CompareTest{
 		{"null,null", document.NewNullValue(), document.NewNullValue(), 0},
-		{"null,int8", document.NewNullValue(), document.NewInt8Value(0), -1},
-		{"int8,null", document.NewInt8Value(0), document.NewNullValue(), 1},
+		{"null,int8", document.NewNullValue(), document.NewIntegerValue(0), -1},
+		{"int8,null", document.NewIntegerValue(0), document.NewNullValue(), 1},
 	}
 
 	// cartesian computes a cartesian product, generating all possible combinations of the passed arrays
@@ -723,11 +685,11 @@ func TestValueCompare(t *testing.T) {
 	}
 
 	// sample numeric values. Values at index [0] are known to be less than values at index [1]
-	int8s := []document.Value{document.NewInt8Value(0), document.NewInt8Value(1)}
-	int16s := []document.Value{document.NewInt16Value(0), document.NewInt16Value(1)}
-	int32s := []document.Value{document.NewInt32Value(0), document.NewInt32Value(1)}
-	int64s := []document.Value{document.NewInt64Value(0), document.NewInt64Value(1)}
-	float64s := []document.Value{document.NewFloat64Value(0), document.NewFloat64Value(1)}
+	int8s := []document.Value{document.NewIntegerValue(0), document.NewIntegerValue(1)}
+	int16s := []document.Value{document.NewIntegerValue(0), document.NewIntegerValue(1)}
+	int32s := []document.Value{document.NewIntegerValue(0), document.NewIntegerValue(1)}
+	int64s := []document.Value{document.NewIntegerValue(0), document.NewIntegerValue(1)}
+	float64s := []document.Value{document.NewDoubleValue(0), document.NewDoubleValue(1)}
 	bools := []document.Value{document.NewBoolValue(false), document.NewBoolValue(true)}
 
 	// generate a batch of tests mixing everything with everything
diff --git a/index/index_test.go b/index/index_test.go
index 607b5c92..d4fcd4d5 100644
--- a/index/index_test.go
+++ b/index/index_test.go
@@ -52,9 +52,9 @@ func TestIndexSet(t *testing.T) {
 		idx, cleanup := getIndex(t, true)
 		defer cleanup()
 
-		require.NoError(t, idx.Set(document.NewIntValue(10), []byte("key")))
-		require.NoError(t, idx.Set(document.NewIntValue(11), []byte("key")))
-		require.Equal(t, index.ErrDuplicate, idx.Set(document.NewIntValue(10), []byte("key")))
+		require.NoError(t, idx.Set(document.NewIntegerValue(10), []byte("key")))
+		require.NoError(t, idx.Set(document.NewIntegerValue(11), []byte("key")))
+		require.Equal(t, index.ErrDuplicate, idx.Set(document.NewIntegerValue(10), []byte("key")))
 	})
 }
 
@@ -63,19 +63,19 @@ func TestIndexDelete(t *testing.T) {
 		idx, cleanup := getIndex(t, false)
 		defer cleanup()
 
-		require.NoError(t, idx.Set(document.NewIntValue(10), []byte("key")))
-		require.NoError(t, idx.Set(document.NewIntValue(10), []byte("other-key")))
-		require.NoError(t, idx.Set(document.NewIntValue(11), []byte("yet-another-key")))
-		require.NoError(t, idx.Delete(document.NewIntValue(10), []byte("key")))
+		require.NoError(t, idx.Set(document.NewIntegerValue(10), []byte("key")))
+		require.NoError(t, idx.Set(document.NewIntegerValue(10), []byte("other-key")))
+		require.NoError(t, idx.Set(document.NewIntegerValue(11), []byte("yet-another-key")))
+		require.NoError(t, idx.Delete(document.NewIntegerValue(10), []byte("key")))
 
-		pivot := document.NewIntValue(10)
+		pivot := document.NewIntegerValue(10)
 		i := 0
 		err := idx.AscendGreaterOrEqual(&index.Pivot{Value: pivot}, func(val document.Value, key []byte) error {
 			if i == 0 {
-				require.Equal(t, document.NewFloat64Value(10), val)
+				require.Equal(t, document.NewDoubleValue(10), val)
 				require.Equal(t, "other-key", string(key))
 			} else if i == 1 {
-				require.Equal(t, document.NewFloat64Value(11), val)
+				require.Equal(t, document.NewDoubleValue(11), val)
 				require.Equal(t, "yet-another-key", string(key))
 			} else {
 				return errors.New("should not reach this point")
@@ -92,19 +92,19 @@ func TestIndexDelete(t *testing.T) {
 		idx, cleanup := getIndex(t, true)
 		defer cleanup()
 
-		require.NoError(t, idx.Set(document.NewIntValue(10), []byte("key1")))
-		require.NoError(t, idx.Set(document.NewIntValue(11), []byte("key2")))
-		require.NoError(t, idx.Set(document.NewIntValue(12), []byte("key3")))
-		require.NoError(t, idx.Delete(document.NewIntValue(11), []byte("key2")))
+		require.NoError(t, idx.Set(document.NewIntegerValue(10), []byte("key1")))
+		require.NoError(t, idx.Set(document.NewIntegerValue(11), []byte("key2")))
+		require.NoError(t, idx.Set(document.NewIntegerValue(12), []byte("key3")))
+		require.NoError(t, idx.Delete(document.NewIntegerValue(11), []byte("key2")))
 
 		i := 0
-		err := idx.AscendGreaterOrEqual(index.EmptyPivot(document.Int64Value), func(val document.Value, key []byte) error {
+		err := idx.AscendGreaterOrEqual(index.EmptyPivot(document.IntegerValue), func(val document.Value, key []byte) error {
 			switch i {
 			case 0:
-				require.Equal(t, document.NewFloat64Value(10), val)
+				require.Equal(t, document.NewDoubleValue(10), val)
 				require.Equal(t, "key1", string(key))
 			case 1:
-				require.Equal(t, document.NewFloat64Value(12), val)
+				require.Equal(t, document.NewDoubleValue(12), val)
 				require.Equal(t, "key3", string(key))
 			default:
 				return errors.New("should not reach this point")
@@ -138,7 +138,7 @@ func TestIndexAscendGreaterThan(t *testing.T) {
 			defer cleanup()
 
 			i := 0
-			err := idx.AscendGreaterOrEqual(index.EmptyPivot(document.Int32Value), func(val document.Value, key []byte) error {
+			err := idx.AscendGreaterOrEqual(index.EmptyPivot(document.IntegerValue), func(val document.Value, key []byte) error {
 				i++
 				return errors.New("should not iterate")
 			})
@@ -153,7 +153,7 @@ func TestIndexAscendGreaterThan(t *testing.T) {
 				t     index.Type
 				pivot *index.Pivot
 			}{
-				{"floats", func(i int) document.Value { return document.NewInt32Value(int32(i)) }, index.Float, index.EmptyPivot(document.Int32Value)},
+				{"floats", func(i int) document.Value { return document.NewIntegerValue(int64(i)) }, index.Float, index.EmptyPivot(document.IntegerValue)},
 				{"bytes", func(i int) document.Value { return document.NewTextValue(string([]byte{byte(i)})) }, index.Bytes, index.EmptyPivot(document.TextValue)},
 			}
 
@@ -171,7 +171,7 @@ func TestIndexAscendGreaterThan(t *testing.T) {
 					err := idx.AscendGreaterOrEqual(test.pivot, func(val document.Value, rid []byte) error {
 						switch test.t {
 						case index.Float:
-							require.Equal(t, document.NewFloat64Value(float64(i)), val)
+							require.Equal(t, document.NewDoubleValue(float64(i)), val)
 						case index.Bytes:
 							require.Equal(t, document.NewBlobValue([]byte{i}), val)
 						case index.Bool:
@@ -216,17 +216,17 @@ func TestIndexAscendGreaterThan(t *testing.T) {
 			idx, cleanup := getIndex(t, unique)
 			defer cleanup()
 
-			for i := 0; i < 10; i++ {
-				require.NoError(t, idx.Set(document.NewIntValue(i), []byte{'i', 'a' + byte(i)}))
-				require.NoError(t, idx.Set(document.NewTextValue(strconv.Itoa(i)), []byte{'s', 'a' + byte(i)}))
+			for i := int64(0); i < 10; i++ {
+				require.NoError(t, idx.Set(document.NewIntegerValue(i), []byte{'i', 'a' + byte(i)}))
+				require.NoError(t, idx.Set(document.NewTextValue(strconv.Itoa(int(i))), []byte{'s', 'a' + byte(i)}))
 			}
 
 			var floats, bytes int
 			var count int
 			err := idx.AscendGreaterOrEqual(nil, func(val document.Value, rid []byte) error {
 				switch val.Type {
-				case document.Float64Value:
-					require.Equal(t, document.NewFloat64Value(float64(floats)), val)
+				case document.DoubleValue:
+					require.Equal(t, document.NewDoubleValue(float64(floats)), val)
 					require.Equal(t, []byte{'i', 'a' + byte(floats)}, rid)
 					floats++
 				case document.BlobValue:
@@ -257,7 +257,7 @@ func TestIndexDescendLessOrEqual(t *testing.T) {
 			defer cleanup()
 
 			i := 0
-			err := idx.DescendLessOrEqual(index.EmptyPivot(document.Int32Value), func(val document.Value, key []byte) error {
+			err := idx.DescendLessOrEqual(index.EmptyPivot(document.IntegerValue), func(val document.Value, key []byte) error {
 				i++
 				return errors.New("should not iterate")
 			})
@@ -270,13 +270,13 @@ func TestIndexDescendLessOrEqual(t *testing.T) {
 			defer cleanup()
 
 			for i := byte(0); i < 10; i += 2 {
-				require.NoError(t, idx.Set(document.NewInt32Value(int32(i)), []byte{'a' + i}))
+				require.NoError(t, idx.Set(document.NewIntegerValue(int64(i)), []byte{'a' + i}))
 			}
 
 			var i uint8 = 8
 			var count int
-			err := idx.DescendLessOrEqual(index.EmptyPivot(document.Int32Value), func(val document.Value, key []byte) error {
-				require.Equal(t, document.NewFloat64Value(float64(i)), val)
+			err := idx.DescendLessOrEqual(index.EmptyPivot(document.IntegerValue), func(val document.Value, key []byte) error {
+				require.Equal(t, document.NewDoubleValue(float64(i)), val)
 				require.Equal(t, []byte{'a' + i}, key)
 
 				i -= 2
@@ -315,7 +315,7 @@ func TestIndexDescendLessOrEqual(t *testing.T) {
 			defer cleanup()
 
 			for i := 0; i < 10; i++ {
-				require.NoError(t, idx.Set(document.NewIntValue(i), []byte{'i', 'a' + byte(i)}))
+				require.NoError(t, idx.Set(document.NewIntegerValue(int64(i)), []byte{'i', 'a' + byte(i)}))
 				require.NoError(t, idx.Set(document.NewTextValue(strconv.Itoa(i)), []byte{'s', 'a' + byte(i)}))
 			}
 
@@ -323,8 +323,8 @@ func TestIndexDescendLessOrEqual(t *testing.T) {
 			var count int = 20
 			err := idx.DescendLessOrEqual(nil, func(val document.Value, rid []byte) error {
 				switch val.Type {
-				case document.Float64Value:
-					require.Equal(t, document.NewFloat64Value(float64(floats)), val)
+				case document.DoubleValue:
+					require.Equal(t, document.NewDoubleValue(float64(floats)), val)
 					require.Equal(t, []byte{'i', 'a' + byte(floats)}, rid)
 					floats--
 				case document.BlobValue:
diff --git a/sql/parser/create_test.go b/sql/parser/create_test.go
index 92365056..804f9193 100644
--- a/sql/parser/create_test.go
+++ b/sql/parser/create_test.go
@@ -18,23 +18,23 @@ func TestParserCreateTable(t *testing.T) {
 	}{
 		{"Basic", "CREATE TABLE test", query.CreateTableStmt{TableName: "test"}, false},
 		{"If not exists", "CREATE TABLE IF NOT EXISTS test", query.CreateTableStmt{TableName: "test", IfNotExists: true}, false},
-		{"With primary key", "CREATE TABLE test(foo INT PRIMARY KEY)",
+		{"With primary key", "CREATE TABLE test(foo INTEGER PRIMARY KEY)",
 			query.CreateTableStmt{
 				TableName: "test",
 				Info: database.TableInfo{
 					FieldConstraints: []database.FieldConstraint{
-						{Path: []string{"foo"}, Type: document.Int64Value, IsPrimaryKey: true},
+						{Path: []string{"foo"}, Type: document.IntegerValue, IsPrimaryKey: true},
 					},
 				},
 			}, false},
 		{"With primary key twice", "CREATE TABLE test(foo PRIMARY KEY PRIMARY KEY)",
 			query.CreateTableStmt{}, true},
-		{"With type", "CREATE TABLE test(foo INT)",
+		{"With type", "CREATE TABLE test(foo INTEGER)",
 			query.CreateTableStmt{
 				TableName: "test",
 				Info: database.TableInfo{
 					FieldConstraints: []database.FieldConstraint{
-						{Path: []string{"foo"}, Type: document.Int64Value},
+						{Path: []string{"foo"}, Type: document.IntegerValue},
 					},
 				},
 			}, false},
@@ -49,40 +49,40 @@ func TestParserCreateTable(t *testing.T) {
 			}, false},
 		{"With not null twice", "CREATE TABLE test(foo NOT NULL NOT NULL)",
 			query.CreateTableStmt{}, true},
-		{"With type and not null", "CREATE TABLE test(foo INT NOT NULL)",
+		{"With type and not null", "CREATE TABLE test(foo INTEGER NOT NULL)",
 			query.CreateTableStmt{
 				TableName: "test",
 				Info: database.TableInfo{
 					FieldConstraints: []database.FieldConstraint{
-						{Path: []string{"foo"}, Type: document.Int64Value, IsNotNull: true},
+						{Path: []string{"foo"}, Type: document.IntegerValue, IsNotNull: true},
 					},
 				},
 			}, false},
-		{"With not null and primary key", "CREATE TABLE test(foo INT NOT NULL PRIMARY KEY)",
+		{"With not null and primary key", "CREATE TABLE test(foo INTEGER NOT NULL PRIMARY KEY)",
 			query.CreateTableStmt{
 				TableName: "test",
 				Info: database.TableInfo{
 					FieldConstraints: []database.FieldConstraint{
-						{Path: []string{"foo"}, Type: document.Int64Value, IsPrimaryKey: true, IsNotNull: true},
+						{Path: []string{"foo"}, Type: document.IntegerValue, IsPrimaryKey: true, IsNotNull: true},
 					},
 				},
 			}, false},
-		{"With primary key and not null", "CREATE TABLE test(foo INT PRIMARY KEY NOT NULL)",
+		{"With primary key and not null", "CREATE TABLE test(foo INTEGER PRIMARY KEY NOT NULL)",
 			query.CreateTableStmt{
 				TableName: "test",
 				Info: database.TableInfo{
 					FieldConstraints: []database.FieldConstraint{
-						{Path: []string{"foo"}, Type: document.Int64Value, IsPrimaryKey: true, IsNotNull: true},
+						{Path: []string{"foo"}, Type: document.IntegerValue, IsPrimaryKey: true, IsNotNull: true},
 					},
 				},
 			}, false},
-		{"With multiple constraints", "CREATE TABLE test(foo INT PRIMARY KEY, bar INT16 NOT NULL, baz.4.1.bat STRING)",
+		{"With multiple constraints", "CREATE TABLE test(foo INTEGER PRIMARY KEY, bar INTEGER NOT NULL, baz.4.1.bat TEXT)",
 			query.CreateTableStmt{
 				TableName: "test",
 				Info: database.TableInfo{
 					FieldConstraints: []database.FieldConstraint{
-						{Path: []string{"foo"}, Type: document.Int64Value, IsPrimaryKey: true},
-						{Path: []string{"bar"}, Type: document.Int16Value, IsNotNull: true},
+						{Path: []string{"foo"}, Type: document.IntegerValue, IsPrimaryKey: true},
+						{Path: []string{"bar"}, Type: document.IntegerValue, IsNotNull: true},
 						{Path: []string{"baz", "4", "1", "bat"}, Type: document.TextValue},
 					},
 				},
@@ -90,34 +90,27 @@ func TestParserCreateTable(t *testing.T) {
 		{"With multiple primary keys", "CREATE TABLE test(foo PRIMARY KEY, bar PRIMARY KEY)",
 			query.CreateTableStmt{}, true},
 		{"With all supported fixed size data types",
-			"CREATE TABLE test(i8 int8, i16 int16, i32 int32, i64 int64, f64 float64, b bool)",
+			"CREATE TABLE test(d double, b bool)",
 			query.CreateTableStmt{
 				TableName: "test",
 				Info: database.TableInfo{
 					FieldConstraints: []database.FieldConstraint{
-						{Path: []string{"i8"}, Type: document.Int8Value},
-						{Path: []string{"i16"}, Type: document.Int16Value},
-						{Path: []string{"i32"}, Type: document.Int32Value},
-						{Path: []string{"i64"}, Type: document.Int64Value},
-						{Path: []string{"f64"}, Type: document.Float64Value},
+						{Path: []string{"d"}, Type: document.DoubleValue},
 						{Path: []string{"b"}, Type: document.BoolValue},
 					},
 				},
 			}, false},
 		{"With all supported variable size data types",
-			"CREATE TABLE test(i int, ig integer, n numeric, du duration, b blob, byt bytes, t text, s string, a array, d document)",
+			"CREATE TABLE test(i integer, du duration, b blob, byt bytes, t text, a array, d document)",
 			query.CreateTableStmt{
 				TableName: "test",
 				Info: database.TableInfo{
 					FieldConstraints: []database.FieldConstraint{
-						{Path: []string{"i"}, Type: document.Int64Value},
-						{Path: []string{"ig"}, Type: document.Int64Value},
-						{Path: []string{"n"}, Type: document.Float64Value},
+						{Path: []string{"i"}, Type: document.IntegerValue},
 						{Path: []string{"du"}, Type: document.DurationValue},
 						{Path: []string{"b"}, Type: document.BlobValue},
 						{Path: []string{"byt"}, Type: document.BlobValue},
 						{Path: []string{"t"}, Type: document.TextValue},
-						{Path: []string{"s"}, Type: document.TextValue},
 						{Path: []string{"a"}, Type: document.ArrayValue},
 						{Path: []string{"d"}, Type: document.DocumentValue},
 					},
diff --git a/sql/parser/delete_test.go b/sql/parser/delete_test.go
index 4762ccb8..dd124a77 100644
--- a/sql/parser/delete_test.go
+++ b/sql/parser/delete_test.go
@@ -22,7 +22,7 @@ func TestParserDelete(t *testing.T) {
 			planner.NewTree(planner.NewDeletionNode(
 				planner.NewSelectionNode(
 					planner.NewTableInputNode("test"),
-					expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10))),
+					expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10))),
 				"test"))},
 	}
 
diff --git a/sql/parser/expr_test.go b/sql/parser/expr_test.go
index 6b94a62a..f76cc2fe 100644
--- a/sql/parser/expr_test.go
+++ b/sql/parser/expr_test.go
@@ -18,21 +18,21 @@ func TestParserExpr(t *testing.T) {
 		fails    bool
 	}{
 		// integers
-		{"+int8", "10", expr.IntValue(10), false},
-		{"-int8", "-10", expr.IntValue(-10), false},
-		{"+int16", "1000", expr.IntValue(1000), false},
-		{"-int16", "-1000", expr.IntValue(-1000), false},
-		{"+int32", "10000000", expr.IntValue(10000000), false},
-		{"-int32", "-10000000", expr.IntValue(-10000000), false},
-		{"+int64", "10000000000", expr.IntValue(10000000000), false},
-		{"-int64", "-10000000000", expr.IntValue(-10000000000), false},
-		{"> max int64 -> float64", "10000000000000000000", expr.Float64Value(10000000000000000000), false},
-		{"< min int64 -> float64", "-10000000000000000000", expr.Float64Value(-10000000000000000000), false},
-		{"very large int", "100000000000000000000000000000000000000000000000", expr.Float64Value(100000000000000000000000000000000000000000000000), false},
+		{"+int8", "10", expr.IntegerValue(10), false},
+		{"-int8", "-10", expr.IntegerValue(-10), false},
+		{"+int16", "1000", expr.IntegerValue(1000), false},
+		{"-int16", "-1000", expr.IntegerValue(-1000), false},
+		{"+int32", "10000000", expr.IntegerValue(10000000), false},
+		{"-int32", "-10000000", expr.IntegerValue(-10000000), false},
+		{"+int64", "10000000000", expr.IntegerValue(10000000000), false},
+		{"-int64", "-10000000000", expr.IntegerValue(-10000000000), false},
+		{"> max int64 -> float64", "10000000000000000000", expr.DoubleValue(10000000000000000000), false},
+		{"< min int64 -> float64", "-10000000000000000000", expr.DoubleValue(-10000000000000000000), false},
+		{"very large int", "100000000000000000000000000000000000000000000000", expr.DoubleValue(100000000000000000000000000000000000000000000000), false},
 
 		// floats
-		{"+float64", "10.0", expr.Float64Value(10), false},
-		{"-float64", "-10.0", expr.Float64Value(-10), false},
+		{"+float64", "10.0", expr.DoubleValue(10), false},
+		{"-float64", "-10.0", expr.DoubleValue(-10), false},
 
 		// durations
 		{"+duration", "150ms", expr.DurationValue(150 * time.Millisecond), false},
@@ -55,8 +55,8 @@ func TestParserExpr(t *testing.T) {
 		{"empty document", `{}`, expr.KVPairs(nil), false},
 		{"document values", `{a: 1, b: 1.0, c: true, d: 'string', e: "string", f: {foo: 'bar'}, g: h.i.j, k: [1, 2, 3]}`,
 			expr.KVPairs{
-				expr.KVPair{K: "a", V: expr.IntValue(1)},
-				expr.KVPair{K: "b", V: expr.Float64Value(1)},
+				expr.KVPair{K: "a", V: expr.IntegerValue(1)},
+				expr.KVPair{K: "b", V: expr.DoubleValue(1)},
 				expr.KVPair{K: "c", V: expr.BoolValue(true)},
 				expr.KVPair{K: "d", V: expr.TextValue("string")},
 				expr.KVPair{K: "e", V: expr.TextValue("string")},
@@ -64,21 +64,21 @@ func TestParserExpr(t *testing.T) {
 					expr.KVPair{K: "foo", V: expr.TextValue("bar")},
 				}},
 				expr.KVPair{K: "g", V: expr.FieldSelector([]string{"h", "i", "j"})},
-				expr.KVPair{K: "k", V: expr.LiteralExprList{expr.IntValue(1), expr.IntValue(2), expr.IntValue(3)}},
+				expr.KVPair{K: "k", V: expr.LiteralExprList{expr.IntegerValue(1), expr.IntegerValue(2), expr.IntegerValue(3)}},
 			},
 			false},
 		{"document keys", `{a: 1, "foo bar __&&))": 1, 'ola ': 1}`,
 			expr.KVPairs{
-				expr.KVPair{K: "a", V: expr.IntValue(1)},
-				expr.KVPair{K: "foo bar __&&))", V: expr.IntValue(1)},
-				expr.KVPair{K: "ola ", V: expr.IntValue(1)},
+				expr.KVPair{K: "a", V: expr.IntegerValue(1)},
+				expr.KVPair{K: "foo bar __&&))", V: expr.IntegerValue(1)},
+				expr.KVPair{K: "ola ", V: expr.IntegerValue(1)},
 			},
 			false},
 		{"document keys: same key", `{a: 1, a: 2, "a": 3}`,
 			expr.KVPairs{
-				expr.KVPair{K: "a", V: expr.IntValue(1)},
-				expr.KVPair{K: "a", V: expr.IntValue(2)},
-				expr.KVPair{K: "a", V: expr.IntValue(3)},
+				expr.KVPair{K: "a", V: expr.IntegerValue(1)},
+				expr.KVPair{K: "a", V: expr.IntegerValue(2)},
+				expr.KVPair{K: "a", V: expr.IntegerValue(3)},
 			},
 			false},
 		{"bad document keys: param", `{?: 1}`, nil, true},
@@ -91,66 +91,66 @@ func TestParserExpr(t *testing.T) {
 		{"list with parentheses: empty", "()", expr.LiteralExprList(nil), false},
 		{"list with parentheses: values", `(1, true, {a: 1}, a.b.c, (-1), [-1])`,
 			expr.LiteralExprList{
-				expr.IntValue(1),
+				expr.IntegerValue(1),
 				expr.BoolValue(true),
-				expr.KVPairs{expr.KVPair{K: "a", V: expr.IntValue(1)}},
+				expr.KVPairs{expr.KVPair{K: "a", V: expr.IntegerValue(1)}},
 				expr.FieldSelector{"a", "b", "c"},
-				expr.LiteralExprList{expr.IntValue(-1)},
-				expr.LiteralExprList{expr.IntValue(-1)},
+				expr.LiteralExprList{expr.IntegerValue(-1)},
+				expr.LiteralExprList{expr.IntegerValue(-1)},
 			}, false},
 		{"list with parentheses: missing parenthese", `(1, true, {a: 1}, a.b.c, (-1)`, nil, true},
 		{"list with brackets: empty", "[]", expr.LiteralExprList(nil), false},
 		{"list with brackets: values", `[1, true, {a: 1}, a.b.c, (-1), [-1]]`,
 			expr.LiteralExprList{
-				expr.IntValue(1),
+				expr.IntegerValue(1),
 				expr.BoolValue(true),
-				expr.KVPairs{expr.KVPair{K: "a", V: expr.IntValue(1)}},
+				expr.KVPairs{expr.KVPair{K: "a", V: expr.IntegerValue(1)}},
 				expr.FieldSelector{"a", "b", "c"},
-				expr.LiteralExprList{expr.IntValue(-1)},
-				expr.LiteralExprList{expr.IntValue(-1)},
+				expr.LiteralExprList{expr.IntegerValue(-1)},
+				expr.LiteralExprList{expr.IntegerValue(-1)},
 			}, false},
 		{"list with brackets: missing bracket", `[1, true, {a: 1}, a.b.c, (-1), [-1]`, nil, true},
 
 		// operators
-		{"=", "age = 10", expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)), false},
-		{"!=", "age != 10", expr.Neq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)), false},
-		{">", "age > 10", expr.Gt(expr.FieldSelector([]string{"age"}), expr.IntValue(10)), false},
-		{">=", "age >= 10", expr.Gte(expr.FieldSelector([]string{"age"}), expr.IntValue(10)), false},
-		{"<", "age < 10", expr.Lt(expr.FieldSelector([]string{"age"}), expr.IntValue(10)), false},
-		{"<=", "age <= 10", expr.Lte(expr.FieldSelector([]string{"age"}), expr.IntValue(10)), false},
-		{"+", "age + 10", expr.Add(expr.FieldSelector([]string{"age"}), expr.IntValue(10)), false},
-		{"-", "age - 10", expr.Sub(expr.FieldSelector([]string{"age"}), expr.IntValue(10)), false},
-		{"*", "age * 10", expr.Mul(expr.FieldSelector([]string{"age"}), expr.IntValue(10)), false},
-		{"/", "age / 10", expr.Div(expr.FieldSelector([]string{"age"}), expr.IntValue(10)), false},
-		{"%", "age % 10", expr.Mod(expr.FieldSelector([]string{"age"}), expr.IntValue(10)), false},
-		{"&", "age & 10", expr.BitwiseAnd(expr.FieldSelector([]string{"age"}), expr.IntValue(10)), false},
+		{"=", "age = 10", expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)), false},
+		{"!=", "age != 10", expr.Neq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)), false},
+		{">", "age > 10", expr.Gt(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)), false},
+		{">=", "age >= 10", expr.Gte(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)), false},
+		{"<", "age < 10", expr.Lt(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)), false},
+		{"<=", "age <= 10", expr.Lte(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)), false},
+		{"+", "age + 10", expr.Add(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)), false},
+		{"-", "age - 10", expr.Sub(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)), false},
+		{"*", "age * 10", expr.Mul(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)), false},
+		{"/", "age / 10", expr.Div(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)), false},
+		{"%", "age % 10", expr.Mod(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)), false},
+		{"&", "age & 10", expr.BitwiseAnd(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)), false},
 		{"IN", "age IN ages", expr.In(expr.FieldSelector([]string{"age"}), expr.FieldSelector([]string{"ages"})), false},
 		{"IS", "age IS NULL", expr.Is(expr.FieldSelector([]string{"age"}), expr.NullValue()), false},
 		{"IS NOT", "age IS NOT NULL", expr.IsNot(expr.FieldSelector([]string{"age"}), expr.NullValue()), false},
 		{"precedence", "4 > 1 + 2", expr.Gt(
-			expr.IntValue(4),
+			expr.IntegerValue(4),
 			expr.Add(
-				expr.IntValue(1),
-				expr.IntValue(2),
+				expr.IntegerValue(1),
+				expr.IntegerValue(2),
 			),
 		), false},
 		{"AND", "age = 10 AND age <= 11",
 			expr.And(
-				expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)),
-				expr.Lte(expr.FieldSelector([]string{"age"}), expr.IntValue(11)),
+				expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)),
+				expr.Lte(expr.FieldSelector([]string{"age"}), expr.IntegerValue(11)),
 			), false},
 		{"OR", "age = 10 OR age = 11",
 			expr.Or(
-				expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)),
-				expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(11)),
+				expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)),
+				expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(11)),
 			), false},
 		{"AND then OR", "age >= 10 AND age > $age OR age < 10.4",
 			expr.Or(
 				expr.And(
-					expr.Gte(expr.FieldSelector([]string{"age"}), expr.IntValue(10)),
+					expr.Gte(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)),
 					expr.Gt(expr.FieldSelector([]string{"age"}), expr.NamedParam("age")),
 				),
-				expr.Lt(expr.FieldSelector([]string{"age"}), expr.Float64Value(10.4)),
+				expr.Lt(expr.FieldSelector([]string{"age"}), expr.DoubleValue(10.4)),
 			), false},
 		{"with NULL", "age > NULL", expr.Gt(expr.FieldSelector([]string{"age"}), expr.NullValue()), false},
 		{"pk() function", "pk()", &expr.PKFunc{}, false},
diff --git a/sql/parser/insert_test.go b/sql/parser/insert_test.go
index 30f9a3c0..06660ab0 100644
--- a/sql/parser/insert_test.go
+++ b/sql/parser/insert_test.go
@@ -20,10 +20,10 @@ func TestParserInsert(t *testing.T) {
 				TableName: "test",
 				Values: expr.LiteralExprList{
 					expr.KVPairs{
-						expr.KVPair{K: "a", V: expr.IntValue(1)},
+						expr.KVPair{K: "a", V: expr.IntegerValue(1)},
 						expr.KVPair{K: "b", V: expr.TextValue("foo")},
 						expr.KVPair{K: "c", V: expr.TextValue("bar")},
-						expr.KVPair{K: "d", V: expr.Eq(expr.IntValue(1), expr.IntValue(1))},
+						expr.KVPair{K: "d", V: expr.Eq(expr.IntegerValue(1), expr.IntegerValue(1))},
 						expr.KVPair{K: "e", V: expr.KVPairs{
 							expr.KVPair{K: "f", V: expr.TextValue("baz")},
 						}},
@@ -35,9 +35,9 @@ func TestParserInsert(t *testing.T) {
 				Values: expr.LiteralExprList{
 					expr.KVPairs{
 						expr.KVPair{K: "a", V: expr.TextValue("a")},
-						expr.KVPair{K: "b", V: expr.Float64Value(-2.3)},
+						expr.KVPair{K: "b", V: expr.DoubleValue(-2.3)},
 					},
-					expr.KVPairs{expr.KVPair{K: "a", V: expr.IntValue(1)}, expr.KVPair{K: "d", V: expr.BoolValue(true)}},
+					expr.KVPairs{expr.KVPair{K: "a", V: expr.IntegerValue(1)}, expr.KVPair{K: "d", V: expr.BoolValue(true)}},
 				},
 			}, false},
 		{"Documents / Positional Param", "INSERT INTO test VALUES ?, ?",
diff --git a/sql/parser/select_test.go b/sql/parser/select_test.go
index 1bb4ea28..c435d0e7 100644
--- a/sql/parser/select_test.go
+++ b/sql/parser/select_test.go
@@ -19,7 +19,7 @@ func TestParserSelect(t *testing.T) {
 		{"NoTable", "SELECT 1",
 			planner.NewTree(planner.NewProjectionNode(nil,
 				[]planner.ResultField{
-					planner.ResultFieldExpr{Expr: expr.IntValue(1), ExprName: "1"},
+					planner.ResultFieldExpr{Expr: expr.IntegerValue(1), ExprName: "1"},
 				}, "")),
 			false,
 		},
@@ -67,7 +67,7 @@ func TestParserSelect(t *testing.T) {
 			planner.NewTree(
 				planner.NewProjectionNode(
 					planner.NewTableInputNode("test"),
-					[]planner.ResultField{planner.ResultFieldExpr{Expr: expr.Gt(expr.FieldSelector([]string{"a"}), expr.IntValue(1)), ExprName: "a    > 1"}},
+					[]planner.ResultField{planner.ResultFieldExpr{Expr: expr.Gt(expr.FieldSelector([]string{"a"}), expr.IntegerValue(1)), ExprName: "a    > 1"}},
 					"test",
 				)),
 			false},
@@ -76,7 +76,7 @@ func TestParserSelect(t *testing.T) {
 				planner.NewProjectionNode(
 					planner.NewSelectionNode(
 						planner.NewTableInputNode("test"),
-						expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)),
+						expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)),
 					),
 					[]planner.ResultField{planner.Wildcard{}},
 					"test",
@@ -88,7 +88,7 @@ func TestParserSelect(t *testing.T) {
 					planner.NewSortNode(
 						planner.NewSelectionNode(
 							planner.NewTableInputNode("test"),
-							expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)),
+							expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)),
 						),
 						[]string{"a", "b", "c"},
 						scanner.ASC,
@@ -103,7 +103,7 @@ func TestParserSelect(t *testing.T) {
 					planner.NewSortNode(
 						planner.NewSelectionNode(
 							planner.NewTableInputNode("test"),
-							expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)),
+							expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)),
 						),
 						[]string{"a", "b", "c"},
 						scanner.ASC,
@@ -118,7 +118,7 @@ func TestParserSelect(t *testing.T) {
 					planner.NewSortNode(
 						planner.NewSelectionNode(
 							planner.NewTableInputNode("test"),
-							expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)),
+							expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)),
 						),
 						[]string{"a", "b", "c"},
 						scanner.DESC,
@@ -133,7 +133,7 @@ func TestParserSelect(t *testing.T) {
 					planner.NewLimitNode(
 						planner.NewSelectionNode(
 							planner.NewTableInputNode("test"),
-							expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)),
+							expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)),
 						),
 						20,
 					),
@@ -147,7 +147,7 @@ func TestParserSelect(t *testing.T) {
 					planner.NewOffsetNode(
 						planner.NewSelectionNode(
 							planner.NewTableInputNode("test"),
-							expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)),
+							expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)),
 						),
 						20,
 					),
@@ -162,7 +162,7 @@ func TestParserSelect(t *testing.T) {
 						planner.NewOffsetNode(
 							planner.NewSelectionNode(
 								planner.NewTableInputNode("test"),
-								expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)),
+								expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)),
 							),
 							20,
 						),
diff --git a/sql/parser/update_test.go b/sql/parser/update_test.go
index af54dc3d..0e828981 100644
--- a/sql/parser/update_test.go
+++ b/sql/parser/update_test.go
@@ -20,7 +20,7 @@ func TestParserUpdate(t *testing.T) {
 				planner.NewReplacementNode(
 					planner.NewSetNode(
 						planner.NewTableInputNode("test"),
-						"a", expr.IntValue(1),
+						"a", expr.IntegerValue(1),
 					),
 					"test",
 				)),
@@ -32,11 +32,11 @@ func TestParserUpdate(t *testing.T) {
 						planner.NewSetNode(
 							planner.NewSelectionNode(
 								planner.NewTableInputNode("test"),
-								expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)),
+								expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)),
 							),
-							"a", expr.IntValue(1),
+							"a", expr.IntegerValue(1),
 						),
-						"b", expr.IntValue(2),
+						"b", expr.IntegerValue(2),
 					),
 					"test",
 				)),
@@ -58,7 +58,7 @@ func TestParserUpdate(t *testing.T) {
 						planner.NewUnsetNode(
 							planner.NewSelectionNode(
 								planner.NewTableInputNode("test"),
-								expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntValue(10)),
+								expr.Eq(expr.FieldSelector([]string{"age"}), expr.IntegerValue(10)),
 							),
 							"a",
 						),
diff --git a/sql/planner/optimizer_test.go b/sql/planner/optimizer_test.go
index 1c0949bc..63b37af3 100644
--- a/sql/planner/optimizer_test.go
+++ b/sql/planner/optimizer_test.go
@@ -58,12 +58,12 @@ func TestSplitANDConditionRule(t *testing.T) {
 				planner.NewSelectionNode(planner.NewTableInputNode("foo"),
 					expr.And(
 						expr.And(
-							expr.IntValue(1),
-							expr.IntValue(2),
+							expr.IntegerValue(1),
+							expr.IntegerValue(2),
 						),
 						expr.And(
-							expr.IntValue(3),
-							expr.IntValue(4),
+							expr.IntegerValue(3),
+							expr.IntegerValue(4),
 						),
 					),
 				), 10),
@@ -73,10 +73,10 @@ func TestSplitANDConditionRule(t *testing.T) {
 						planner.NewSelectionNode(
 							planner.NewSelectionNode(
 								planner.NewTableInputNode("foo"),
-								expr.IntValue(4)),
-							expr.IntValue(3)),
-						expr.IntValue(2)),
-					expr.IntValue(1)),
+								expr.IntegerValue(4)),
+							expr.IntegerValue(3)),
+						expr.IntegerValue(2)),
+					expr.IntegerValue(1)),
 				10,
 			),
 		},
@@ -98,65 +98,65 @@ func TestPrecalculateExprRule(t *testing.T) {
 	}{
 		{
 			"constant expr: 3 -> 3",
-			expr.IntValue(3),
-			expr.IntValue(3),
+			expr.IntegerValue(3),
+			expr.IntegerValue(3),
 		},
 		{
 			"operator with two constant operands: 3 + true -> 4",
-			expr.Add(expr.IntValue(3), expr.BoolValue(true)),
-			expr.IntValue(4),
+			expr.Add(expr.IntegerValue(3), expr.BoolValue(true)),
+			expr.IntegerValue(4),
 		},
 		{
 			"operator with constant nested operands: 3 > true - 40 -> true",
-			expr.Gt(expr.IntValue(3), expr.Sub(expr.BoolValue(true), expr.Float64Value(40))),
+			expr.Gt(expr.IntegerValue(3), expr.Sub(expr.BoolValue(true), expr.DoubleValue(40))),
 			expr.BoolValue(true),
 		},
 		{
 			"constant sub-expr: a > true - 40 -> a > -39",
-			expr.Gt(expr.FieldSelector{"a"}, expr.Sub(expr.BoolValue(true), expr.Float64Value(40))),
-			expr.Gt(expr.FieldSelector{"a"}, expr.Float64Value(-39)),
+			expr.Gt(expr.FieldSelector{"a"}, expr.Sub(expr.BoolValue(true), expr.DoubleValue(40))),
+			expr.Gt(expr.FieldSelector{"a"}, expr.DoubleValue(-39)),
 		},
 		{
 			"non-constant expr list: [a, true - 40] -> [a, -39]",
 			expr.LiteralExprList{
 				expr.FieldSelector([]string{"a"}),
-				expr.Sub(expr.BoolValue(true), expr.Float64Value(40)),
+				expr.Sub(expr.BoolValue(true), expr.DoubleValue(40)),
 			},
 			expr.LiteralExprList{
 				expr.FieldSelector([]string{"a"}),
-				expr.Float64Value(-39),
+				expr.DoubleValue(-39),
 			},
 		},
 		{
 			"constant expr list: [3, true - 40] -> array([3, 40])",
 			expr.LiteralExprList{
-				expr.IntValue(3),
-				expr.Sub(expr.BoolValue(true), expr.Float64Value(40)),
+				expr.IntegerValue(3),
+				expr.Sub(expr.BoolValue(true), expr.DoubleValue(40)),
 			},
 			expr.LiteralValue(document.NewArrayValue(document.NewValueBuffer().
-				Append(document.NewIntValue(3)).
-				Append(document.NewFloat64Value(-39)))),
+				Append(document.NewIntegerValue(3)).
+				Append(document.NewDoubleValue(-39)))),
 		},
 		{
 			`non-constant kvpair: {"a": d, "b": 1 - 40} -> {"a": 3, "b": -39}`,
 			expr.KVPairs{
 				{K: "a", V: expr.FieldSelector{"d"}},
-				{K: "b", V: expr.Sub(expr.BoolValue(true), expr.Float64Value(40))},
+				{K: "b", V: expr.Sub(expr.BoolValue(true), expr.DoubleValue(40))},
 			},
 			expr.KVPairs{
 				{K: "a", V: expr.FieldSelector{"d"}},
-				{K: "b", V: expr.Float64Value(-39)},
+				{K: "b", V: expr.DoubleValue(-39)},
 			},
 		},
 		{
 			`constant kvpair: {"a": 3, "b": 1 - 40} -> document({"a": 3, "b": -39})`,
 			expr.KVPairs{
-				{K: "a", V: expr.IntValue(3)},
-				{K: "b", V: expr.Sub(expr.BoolValue(true), expr.Float64Value(40))},
+				{K: "a", V: expr.IntegerValue(3)},
+				{K: "b", V: expr.Sub(expr.BoolValue(true), expr.DoubleValue(40))},
 			},
 			expr.LiteralValue(document.NewDocumentValue(document.NewFieldBuffer().
-				Add("a", document.NewIntValue(3)).
-				Add("b", document.NewFloat64Value(-39)),
+				Add("a", document.NewIntegerValue(3)).
+				Add("b", document.NewDoubleValue(-39)),
 			)),
 		},
 	}
@@ -182,12 +182,12 @@ func TestRemoveUnnecessarySelectionNodesRule(t *testing.T) {
 		},
 		{
 			"truthy constant expr",
-			planner.NewSelectionNode(planner.NewTableInputNode("foo"), expr.IntValue(10)),
+			planner.NewSelectionNode(planner.NewTableInputNode("foo"), expr.IntegerValue(10)),
 			planner.NewTableInputNode("foo"),
 		},
 		{
 			"falsy constant expr",
-			planner.NewSelectionNode(planner.NewTableInputNode("foo"), expr.IntValue(0)),
+			planner.NewSelectionNode(planner.NewTableInputNode("foo"), expr.IntegerValue(0)),
 			nil,
 		},
 	}
@@ -215,7 +215,7 @@ func TestUseIndexBasedOnSelectionNodeRule(t *testing.T) {
 			planner.NewSelectionNode(planner.NewTableInputNode("foo"),
 				expr.Eq(
 					expr.FieldSelector{"d"},
-					expr.IntValue(1),
+					expr.IntegerValue(1),
 				)),
 			nil,
 		},
@@ -224,13 +224,13 @@ func TestUseIndexBasedOnSelectionNodeRule(t *testing.T) {
 			planner.NewSelectionNode(planner.NewTableInputNode("foo"),
 				expr.Eq(
 					expr.FieldSelector{"a"},
-					expr.IntValue(1),
+					expr.IntegerValue(1),
 				)),
 			planner.NewIndexInputNode(
 				"foo",
 				"idx_foo_a",
 				expr.Eq(nil, nil).(planner.IndexIteratorOperator),
-				expr.IntValue(1),
+				expr.IntegerValue(1),
 				scanner.ASC,
 			),
 		},
@@ -240,12 +240,12 @@ func TestUseIndexBasedOnSelectionNodeRule(t *testing.T) {
 				planner.NewSelectionNode(planner.NewTableInputNode("foo"),
 					expr.Eq(
 						expr.FieldSelector{"a"},
-						expr.IntValue(1),
+						expr.IntegerValue(1),
 					),
 				),
 				expr.Eq(
 					expr.FieldSelector{"b"},
-					expr.IntValue(2),
+					expr.IntegerValue(2),
 				),
 			),
 			planner.NewSelectionNode(
@@ -253,12 +253,12 @@ func TestUseIndexBasedOnSelectionNodeRule(t *testing.T) {
 					"foo",
 					"idx_foo_b",
 					expr.Eq(nil, nil).(planner.IndexIteratorOperator),
-					expr.IntValue(2),
+					expr.IntegerValue(2),
 					scanner.ASC,
 				),
 				expr.Eq(
 					expr.FieldSelector{"a"},
-					expr.IntValue(1),
+					expr.IntegerValue(1),
 				),
 			),
 		},
@@ -268,12 +268,12 @@ func TestUseIndexBasedOnSelectionNodeRule(t *testing.T) {
 				planner.NewSelectionNode(planner.NewTableInputNode("foo"),
 					expr.Eq(
 						expr.FieldSelector{"c"},
-						expr.IntValue(3),
+						expr.IntegerValue(3),
 					),
 				),
 				expr.Eq(
 					expr.FieldSelector{"b"},
-					expr.IntValue(2),
+					expr.IntegerValue(2),
 				),
 			),
 			planner.NewSelectionNode(
@@ -281,12 +281,12 @@ func TestUseIndexBasedOnSelectionNodeRule(t *testing.T) {
 					"foo",
 					"idx_foo_c",
 					expr.Eq(nil, nil).(planner.IndexIteratorOperator),
-					expr.IntValue(3),
+					expr.IntegerValue(3),
 					scanner.ASC,
 				),
 				expr.Eq(
 					expr.FieldSelector{"b"},
-					expr.IntValue(2),
+					expr.IntegerValue(2),
 				),
 			),
 		},
@@ -297,12 +297,12 @@ func TestUseIndexBasedOnSelectionNodeRule(t *testing.T) {
 					planner.NewSelectionNode(planner.NewTableInputNode("foo"),
 						expr.Eq(
 							expr.FieldSelector{"c"},
-							expr.IntValue(3),
+							expr.IntegerValue(3),
 						),
 					),
 					expr.Eq(
 						expr.FieldSelector{"b"},
-						expr.IntValue(2),
+						expr.IntegerValue(2),
 					),
 				),
 				[]planner.ResultField{
@@ -318,12 +318,12 @@ func TestUseIndexBasedOnSelectionNodeRule(t *testing.T) {
 						"foo",
 						"idx_foo_c",
 						expr.Eq(nil, nil).(planner.IndexIteratorOperator),
-						expr.IntValue(3),
+						expr.IntegerValue(3),
 						scanner.ASC,
 					),
 					expr.Eq(
 						expr.FieldSelector{"b"},
-						expr.IntValue(2),
+						expr.IntegerValue(2),
 					),
 				),
 				[]planner.ResultField{
diff --git a/sql/query/create_test.go b/sql/query/create_test.go
index 88293f03..65b5d153 100644
--- a/sql/query/create_test.go
+++ b/sql/query/create_test.go
@@ -19,8 +19,8 @@ func TestCreateTable(t *testing.T) {
 		{"Exists", "CREATE TABLE test;CREATE TABLE test", true},
 		{"If not exists", "CREATE TABLE IF NOT EXISTS test", false},
 		{"If not exists, twice", "CREATE TABLE IF NOT EXISTS test;CREATE TABLE IF NOT EXISTS test", false},
-		{"With primary key", "CREATE TABLE test(foo STRING PRIMARY KEY)", false},
-		{"With field constraints", "CREATE TABLE test(foo.a.1.2 STRING primary key, bar.4.0.bat int8 not null, baz not null)", false},
+		{"With primary key", "CREATE TABLE test(foo TEXT PRIMARY KEY)", false},
+		{"With field constraints", "CREATE TABLE test(foo.a.1.2 TEXT primary key, bar.4.0.bat INTEGER not null, baz not null)", false},
 		{"With no constraints", "CREATE TABLE test(a, b)", false},
 	}
 
@@ -50,7 +50,7 @@ func TestCreateTable(t *testing.T) {
 		defer db.Close()
 
 		t.Run("with fixed size data types", func(t *testing.T) {
-			err = db.Exec(`CREATE TABLE test(i8 int8, i16 int16, i32 int32, i64 int64, f64 float64, b bool)`)
+			err = db.Exec(`CREATE TABLE test(d double, b bool)`)
 			require.NoError(t, err)
 
 			err = db.ViewTable("test", func(_ *genji.Tx, tb *database.Table) error {
@@ -60,11 +60,7 @@ func TestCreateTable(t *testing.T) {
 				}
 
 				require.Equal(t, []database.FieldConstraint{
-					{Path: []string{"i8"}, Type: document.Int8Value},
-					{Path: []string{"i16"}, Type: document.Int16Value},
-					{Path: []string{"i32"}, Type: document.Int32Value},
-					{Path: []string{"i64"}, Type: document.Int64Value},
-					{Path: []string{"f64"}, Type: document.Float64Value},
+					{Path: []string{"d"}, Type: document.DoubleValue},
 					{Path: []string{"b"}, Type: document.BoolValue},
 				}, info.FieldConstraints)
 				return nil
@@ -76,8 +72,8 @@ func TestCreateTable(t *testing.T) {
 		t.Run("with variable size data types", func(t *testing.T) {
 			err = db.Exec(`
 				CREATE TABLE test1(
-					foo.bar.1.hello bytes PRIMARY KEY, foo.a.1.2 STRING NOT NULL, bar.4.0.bat int,
-					ig integer, n numeric, du duration, b blob, t text, a array, d document
+					foo.bar.1.hello bytes PRIMARY KEY, foo.a.1.2 TEXT NOT NULL, bar.4.0.bat integer,
+				 	du duration, b blob, t text, a array, d document
 				)
 			`)
 			require.NoError(t, err)
@@ -91,9 +87,7 @@ func TestCreateTable(t *testing.T) {
 				require.Equal(t, []database.FieldConstraint{
 					{Path: []string{"foo", "bar", "1", "hello"}, Type: document.BlobValue, IsPrimaryKey: true},
 					{Path: []string{"foo", "a", "1", "2"}, Type: document.TextValue, IsNotNull: true},
-					{Path: []string{"bar", "4", "0", "bat"}, Type: document.Int64Value},
-					{Path: []string{"ig"}, Type: document.Int64Value},
-					{Path: []string{"n"}, Type: document.Float64Value},
+					{Path: []string{"bar", "4", "0", "bat"}, Type: document.IntegerValue},
 					{Path: []string{"du"}, Type: document.DurationValue},
 					{Path: []string{"b"}, Type: document.BlobValue},
 					{Path: []string{"t"}, Type: document.TextValue},
diff --git a/sql/query/expr/arithmetic_test.go b/sql/query/expr/arithmetic_test.go
index 08520b3a..faff6a7e 100644
--- a/sql/query/expr/arithmetic_test.go
+++ b/sql/query/expr/arithmetic_test.go
@@ -13,28 +13,28 @@ func TestArithmeticExpr(t *testing.T) {
 		res   document.Value
 		fails bool
 	}{
-		{"1 + a", document.NewIntValue(2), false},
+		{"1 + a", document.NewIntegerValue(2), false},
 		{"1 + NULL", nullLitteral, false},
 		{"1 + notFound", nullLitteral, false},
-		{"1 - a", document.NewIntValue(0), false},
+		{"1 - a", document.NewIntegerValue(0), false},
 		{"1 - NULL", nullLitteral, false},
 		{"1 - notFound", nullLitteral, false},
-		{"1 * a", document.NewIntValue(1), false},
+		{"1 * a", document.NewIntegerValue(1), false},
 		{"1 * NULL", nullLitteral, false},
 		{"1 * notFound", nullLitteral, false},
-		{"1 / a", document.NewIntValue(1), false},
+		{"1 / a", document.NewIntegerValue(1), false},
 		{"1 / NULL", nullLitteral, false},
 		{"1 / notFound", nullLitteral, false},
-		{"1 % a", document.NewIntValue(0), false},
+		{"1 % a", document.NewIntegerValue(0), false},
 		{"1 % NULL", nullLitteral, false},
 		{"1 % notFound", nullLitteral, false},
-		{"1 & a", document.NewIntValue(1), false},
+		{"1 & a", document.NewIntegerValue(1), false},
 		{"1 & NULL", nullLitteral, false},
 		{"1 & notFound", nullLitteral, false},
-		{"1 | a", document.NewIntValue(1), false},
+		{"1 | a", document.NewIntegerValue(1), false},
 		{"1 | NULL", nullLitteral, false},
 		{"1 | notFound", nullLitteral, false},
-		{"1 ^ a", document.NewIntValue(0), false},
+		{"1 ^ a", document.NewIntegerValue(0), false},
 		{"1 ^ NULL", nullLitteral, false},
 		{"1 ^ notFound", nullLitteral, false},
 	}
diff --git a/sql/query/expr/dot_notation_test.go b/sql/query/expr/dot_notation_test.go
index 5c994d7b..c056fc15 100644
--- a/sql/query/expr/dot_notation_test.go
+++ b/sql/query/expr/dot_notation_test.go
@@ -14,17 +14,17 @@ func TestDotNotationExpr(t *testing.T) {
 		res   document.Value
 		fails bool
 	}{
-		{"a", document.NewIntValue(1), false},
+		{"a", document.NewIntegerValue(1), false},
 		{"b", func() document.Value {
 			d, _ := document.NewFromJSON([]byte(`{"foo bar": [1, 2]}`))
 			return document.NewDocumentValue(d)
 		}(),
 			false},
-		{"b.`foo bar`.0", document.NewIntValue(1), false},
-		{"b.`foo bar`.1", document.NewIntValue(2), false},
+		{"b.`foo bar`.0", document.NewIntegerValue(1), false},
+		{"b.`foo bar`.1", document.NewIntegerValue(2), false},
 		{"b.`foo bar`.2", nullLitteral, false},
 		{"b.0", nullLitteral, false},
-		{"c.0", document.NewIntValue(1), false},
+		{"c.0", document.NewIntegerValue(1), false},
 		{"c.1.foo", document.NewTextValue("bar"), false},
 		{"c.foo", nullLitteral, false},
 		{"d", nullLitteral, false},
diff --git a/sql/query/expr/expr_test.go b/sql/query/expr/expr_test.go
index 5ad7a384..d0b8f489 100644
--- a/sql/query/expr/expr_test.go
+++ b/sql/query/expr/expr_test.go
@@ -61,7 +61,7 @@ func TestString(t *testing.T) {
 		`[1, 2, "foo"]`,
 		`{"a": "foo", "b": 10}`,
 		"pk()",
-		"CAST(10 AS int64)",
+		"CAST(10 AS integer)",
 	}
 
 	var operators = []string{
diff --git a/sql/query/expr/function_test.go b/sql/query/expr/function_test.go
index 372c9218..1bd4fd14 100644
--- a/sql/query/expr/function_test.go
+++ b/sql/query/expr/function_test.go
@@ -16,7 +16,7 @@ func TestPkExpr(t *testing.T) {
 	}{
 		{"empty stack", expr.EvalStack{}, nullLitteral, true},
 		{"stack with doc", stackWithDoc, nullLitteral, true},
-		{"stack with doc and info", stackWithDocAndInfo, document.NewIntValue(1), false},
+		{"stack with doc and info", stackWithDocAndInfo, document.NewIntegerValue(1), false},
 	}
 
 	for _, test := range tests {
diff --git a/sql/query/insert_test.go b/sql/query/insert_test.go
index 4ede9ecf..bc15b772 100644
--- a/sql/query/insert_test.go
+++ b/sql/query/insert_test.go
@@ -137,18 +137,18 @@ func TestInsertStmt(t *testing.T) {
 		defer db.Close()
 
 		err = db.Exec(`CREATE TABLE test(
-			i8 int8, i16 int16, i32 int32, i64 int64, f64 float64, b bool,
-			i int, ig integer, n numeric, du duration, bb blob, byt bytes,
-			t text, s string, a array, d document
+			b bool, db double,
+			i integer, du duration, bb blob, byt bytes,
+			t text, a array, d document
 		)`)
 		require.NoError(t, err)
 
 		err = db.Exec(`
 			INSERT INTO test
 			VALUES {
-				i8: 100, i16: 1000, i32: 10000,	i64: 10000000000, f64: 21.21, b: true,
-				i: 1000, ig: 1000, n: 21.21, du: 127ns, bb: "blobValue", byt: "bytesValue",
-				t: "text", s: "string", a: [1, "foo", true], d: {"foo": "bar"}
+				i: 10000000000, db: 21.21, b: true,
+				du: 127ns, bb: "blobValue", byt: "bytesValue",
+				t: "text", a: [1, "foo", true], d: {"foo": "bar"}
 			}`)
 		require.NoError(t, err)
 
@@ -160,20 +160,13 @@ func TestInsertStmt(t *testing.T) {
 		err = document.IteratorToJSON(&buf, res)
 		require.NoError(t, err)
 		require.JSONEq(t, `{
-			"i8": 100,
-			"i16": 1000,
-			"i32": 10000,
-			"i64": 10000000000,
-			"f64": 21.21,
+			"i": 10000000000,
+			"db": 21.21,
 			"b": true,
-			"i": 1000,
-			"ig": 1000,
-			"n": 21.21,
 			"du": 127,
 			"bb": "blobValue",
 			"byt": "bytesValue",
 			"t": "text",
-			"s": "string",
 			"a": [1, "foo", true],
 			"d": {"foo": "bar"}
 		  }`, buf.String())
@@ -190,17 +183,17 @@ func TestInsertStmt(t *testing.T) {
 
 			{"array", "ARRAY", `{a: "[1,2,3]"}`, `cannot convert "text" to "array"`},
 			{"array / not null with type constraint", "ARRAY NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"array / not null with non-respected type constraint ", "ARRAY NOT NULL", `{a: 42}`, `cannot convert "int8" to "array"`},
+			{"array / not null with non-respected type constraint ", "ARRAY NOT NULL", `{a: 42}`, `cannot convert "integer" to "array"`},
 
 			{"blob", "BLOB", `{a: true}`, `cannot convert "bool" to "bytes"`},
 			{"blob / not null with type constraint", "BLOB NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"blob / not null with non-respected type constraint ", "BLOB NOT NULL", `{a: 42}`, `cannot convert "int8" to "bytes"`},
+			{"blob / not null with non-respected type constraint ", "BLOB NOT NULL", `{a: 42}`, `cannot convert "integer" to "bytes"`},
 
 			{"bool / not null with type constraint", "BOOL NOT NULL", `{}`, `field "a" is required and must be not null`},
 
 			{"bytes", "BYTES", `{a: [1,2,3]}`, `cannot convert "array" to "bytes"`},
 			{"bytes / not null with type constraint", "BYTES NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"bytes / not null with non-respected type constraint ", "BYTES NOT NULL", `{a: 42}`, `cannot convert "int8" to "bytes"`},
+			{"bytes / not null with non-respected type constraint ", "BYTES NOT NULL", `{a: 42}`, `cannot convert "integer" to "bytes"`},
 
 			{"document", "DOCUMENT", `{a: "foo"}`, `cannot convert "text" to "document"`},
 			{"document / not null with type constraint", "DOCUMENT NOT NULL", `{}`, `field "a" is required and must be not null`},
@@ -210,45 +203,17 @@ func TestInsertStmt(t *testing.T) {
 			{"duration / not null with type constraint", "DURATION NOT NULL", `{}`, `field "a" is required and must be not null`},
 			{"duration / not null with non-respected type constraint ", "DURATION NOT NULL", `{a: [1,2,3]}`, `type "array" incompatible with "integer"`},
 
-			{"float64", "FLOAT64", `{a: "foo"}`, `cannot convert "text" to "float64"`},
-			{"float64 / not null with type constraint", "FLOAT64 NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"float64 / not null with non-respected type constraint ", "FLOAT64 NOT NULL", `{a: [1,2,3]}`, `cannot convert "array" to "float64"`},
+			{"double", "DOUBLE", `{a: "foo"}`, `cannot convert "text" to "double"`},
+			{"double / not null with type constraint", "DOUBLE NOT NULL", `{}`, `field "a" is required and must be not null`},
+			{"double / not null with non-respected type constraint ", "DOUBLE NOT NULL", `{a: [1,2,3]}`, `cannot convert "array" to "double"`},
 
-			{"int", "INT", `{a: "foo"}`, `cannot convert "text" to "int64": type "text" incompatible with "integer"`},
-			{"int / not null with type constraint", "INT NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"int / not null with non-respected type constraint ", "INT NOT NULL", `{a: [1,2,3]}`, `cannot convert "array" to "int64": type "array" incompatible with "integer"`},
-
-			{"integer", "INTEGER", `{a: "foo"}`, `cannot convert "text" to "int64": type "text" incompatible with "integer"`},
+			{"integer", "INTEGER", `{a: "foo"}`, `cannot convert "text" to "integer": type "text" incompatible with "integer"`},
 			{"integer / not null with type constraint", "INTEGER NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"integer / not null with non-respected type constraint ", "INTEGER NOT NULL", `{a: [1,2,3]}`, `cannot convert "array" to "int64": type "array" incompatible with "integer"`},
-
-			{"int8", "INT8", `{a: "foo"}`, `cannot convert "text" to "int8": type "text" incompatible with "integer"`},
-			{"int8 / not null with type constraint", "INT8 NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"int8 / not null with non-respected type constraint ", "INT8 NOT NULL", `{a: [1,2,3]}`, `cannot convert "array" to "int8": type "array" incompatible with "integer"`},
-
-			{"int16", "INT16", `{a: "foo"}`, `cannot convert "text" to "int16": type "text" incompatible with "integer"`},
-			{"int16 / not null with type constraint", "INT16 NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"int16 / not null with non-respected type constraint ", "INT16 NOT NULL", `{a: [1,2,3]}`, `cannot convert "array" to "int16": type "array" incompatible with "integer"`},
-
-			{"int32", "INT32", `{a: "foo"}`, `cannot convert "text" to "int32": type "text" incompatible with "integer"`},
-			{"int32 / not null with type constraint", "INT32 NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"int32 / not null with non-respected type constraint ", "INT32 NOT NULL", `{a: [1,2,3]}`, `cannot convert "array" to "int32": type "array" incompatible with "integer"`},
-
-			{"int64", "INT64", `{a: "foo"}`, `cannot convert "text" to "int64": type "text" incompatible with "integer"`},
-			{"int64 / not null with type constraint", "INT64 NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"int64 / not null with non-respected type constraint ", "INT64 NOT NULL", `{a: [1,2,3]}`, `cannot convert "array" to "int64": type "array" incompatible with "integer"`},
-
-			{"numeric", "NUMERIC", `{a: "foo"}`, `cannot convert "text" to "float64"`},
-			{"numeric / not null with type constraint", "NUMERIC NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"numeric / not null with non-respected type constraint ", "NUMERIC NOT NULL", `{a: [1,2,3]}`, `cannot convert "array" to "float64"`},
-
-			{"string", "STRING", `{a: [1,2,3]}`, `cannot convert "array" to "string"`},
-			{"string / not null with type constraint", "STRING NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"string / not null with non-respected type constraint ", "STRING NOT NULL", `{a: 420}`, `cannot convert "int16" to "string"`},
+			{"integer / not null with non-respected type constraint ", "INTEGER NOT NULL", `{a: [1,2,3]}`, `cannot convert "array" to "integer": type "array" incompatible with "integer"`},
 
 			{"text", "TEXT", `{a: [1,2,3]}`, `cannot convert "array" to "string"`},
 			{"text / not null with type constraint", "TEXT NOT NULL", `{}`, `field "a" is required and must be not null`},
-			{"text / not null with non-respected type constraint ", "TEXT NOT NULL", `{a: 42}`, `cannot convert "int8" to "string"`},
+			{"text / not null with non-respected type constraint ", "TEXT NOT NULL", `{a: 42}`, `cannot convert "integer" to "string"`},
 		}
 
 		db, err := genji.Open(":memory:")
diff --git a/sql/query/select_test.go b/sql/query/select_test.go
index 71d97159..e7eb04f6 100644
--- a/sql/query/select_test.go
+++ b/sql/query/select_test.go
@@ -125,7 +125,7 @@ func TestSelectStmt(t *testing.T) {
 		require.NoError(t, err)
 		defer db.Close()
 
-		err = db.Exec("CREATE TABLE test (foo INT8 PRIMARY KEY)")
+		err = db.Exec("CREATE TABLE test (foo INTEGER PRIMARY KEY)")
 		require.NoError(t, err)
 
 		err = db.Exec(`INSERT INTO test (foo, bar) VALUES (1, 'a')`)
diff --git a/sql/scanner/scanner_test.go b/sql/scanner/scanner_test.go
index 9eb478a7..20c7f345 100644
--- a/sql/scanner/scanner_test.go
+++ b/sql/scanner/scanner_test.go
@@ -153,16 +153,9 @@ func TestScanner_Scan(t *testing.T) {
 
 		// types
 		{s: "BYTES", tok: scanner.TYPEBYTES, raw: `BYTES`},
-		{s: "STRING", tok: scanner.TYPESTRING, raw: `STRING`},
 		{s: "BOOL", tok: scanner.TYPEBOOL, raw: `BOOL`},
-		{s: "INT8", tok: scanner.TYPEINT8, raw: `INT8`},
-		{s: "INT16", tok: scanner.TYPEINT16, raw: `INT16`},
-		{s: "INT32", tok: scanner.TYPEINT32, raw: `INT32`},
-		{s: "INT64", tok: scanner.TYPEINT64, raw: `INT64`},
-		{s: "INT", tok: scanner.TYPEINT, raw: `INT`},
-		{s: "FLOAT64", tok: scanner.TYPEFLOAT64, raw: `FLOAT64`},
+		{s: "DOUBLE", tok: scanner.TYPEDOUBLE, raw: `DOUBLE`},
 		{s: "INTEGER", tok: scanner.TYPEINTEGER, raw: `INTEGER`},
-		{s: "NUMERIC", tok: scanner.TYPENUMERIC, raw: `NUMERIC`},
 		{s: "TEXT", tok: scanner.TYPETEXT, raw: `TEXT`},
 	}