This commit is contained in:
Jasen Qin 2024-04-24 16:23:43 +10:00
parent 9266f5b6ba
commit 56f5bed4ad
6 changed files with 118 additions and 11 deletions

View File

@ -1,5 +1,6 @@
{
"extends": [
"next"
"next/babel",
"next/core-web-vitals"
]
}

View File

@ -0,0 +1,10 @@
import '@testing-library/jest-dom'
import pl from 'nodejs-polars'
describe('DATABASE', () => {
it('DATA', () => {
const fooSeries = pl.Series("foo", [1, 2, 3])
let res = fooSeries.sum()
console.log(res)
})
})

View File

@ -4,20 +4,20 @@ describe('Database', () => {
it('DB WORKS', () => {
// 1) Create our database, supply location and options.
// This will create or open the underlying RocksDB store.
const db = level('./mydb')
// const db = level('./mydb')
// 2) Put a key & value
// isnt this synchronous?
db.put('name', 'Level', function (err) {
if (err) return console.log('Ooops!', err) // some kind of I/O error
// db.put('name', 'Level', function (err) {
// if (err) return console.log('Ooops!', err) // some kind of I/O error
// 3) Fetch by key
db.get('name', function (err, value) {
if (err) return console.log('Ooops!', err) // likely the key was not found
// // 3) Fetch by key
// db.get('name', function (err, value) {
// if (err) return console.log('Ooops!', err) // likely the key was not found
// Ta da!
console.log('name=' + value)
})
})
// // Ta da!
// console.log('name=' + value)
// })
// })
})
})

View File

@ -0,0 +1,6 @@
import pl from 'nodejs-polars'
const fooSeries = pl.Series("foo", [1, 2, 3])
let res = fooSeries.sum()
console.log(res)

View File

@ -18,6 +18,7 @@
"framer-motion": "^11.0.25",
"level-rocksdb": "^5.0.0",
"next": "^14.1.4",
"nodejs-polars": "^0.11.0",
"react": "^18",
"react-dom": "^18",
"rocksdb": "^5.2.1"

View File

@ -26,6 +26,9 @@ dependencies:
next:
specifier: ^14.1.4
version: 14.1.4(@babel/core@7.24.4)(react-dom@18.2.0)(react@18.2.0)
nodejs-polars:
specifier: ^0.11.0
version: 0.11.0
react:
specifier: ^18
version: 18.2.0
@ -5587,6 +5590,92 @@ packages:
/node-releases@2.0.14:
resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==}
/nodejs-polars-android-arm64@0.11.0:
resolution: {integrity: sha512-AuwmFvhrOELkfqmhV2ZArxV66XLlHNP/1vZqUgbPqG4nmvKi9J4RGRnKXNW+BjDgNzV/PF2OoJekEwe/Nh+whA==}
engines: {node: '>= 16'}
cpu: [arm64]
os: [android]
requiresBuild: true
dev: false
optional: true
/nodejs-polars-darwin-arm64@0.11.0:
resolution: {integrity: sha512-4VuRbWV0s5KlP8Zdw0GY2SGRXS25Ih/3qo0F3VVObDDxu60sU0m32z3fGMziphQw0Dl7Ldk1cloYyu72gnfKCQ==}
engines: {node: '>= 16'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: false
optional: true
/nodejs-polars-darwin-x64@0.11.0:
resolution: {integrity: sha512-SAjq47Mk1cSBpf0czTxSbHMM5vTCwKdnsSFQTtUYyjqN+22l8h5oTDPOppMQ6coq0DxLugnSvmrIOeZ0HY213A==}
engines: {node: '>= 16'}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: false
optional: true
/nodejs-polars-linux-arm64-gnu@0.11.0:
resolution: {integrity: sha512-BH9ePSHYDlG5ggg/YM/kvLuv8TbctRAUUEhCnpgaJeBPnrtRJC+hzbWKpTcGc+pOwvunfGS+/FG9BzLtFb9POg==}
engines: {node: '>= 16'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: false
optional: true
/nodejs-polars-linux-arm64-musl@0.11.0:
resolution: {integrity: sha512-IYZ/xIACiedX4gjklyKzD1/gOOOSvCeINEB3Vc6Ene0cQI52PZtJNwfIo44ofM3Jqx0YDrLW88y5Myu+NdwmOw==}
engines: {node: '>= 16'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: false
optional: true
/nodejs-polars-linux-x64-gnu@0.11.0:
resolution: {integrity: sha512-SnJdhVAGPAxQ5ZB3QVacCF6SnzWI7/2qp1X4AEvaVFoAaZp3ahdE+1K9qYS3EZZM5y1DdVbok1cJzQs8UlM9VA==}
engines: {node: '>= 16'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: false
optional: true
/nodejs-polars-linux-x64-musl@0.11.0:
resolution: {integrity: sha512-ug8f34akvrrHDU8UvObU45VswwVJYN85AUF+K5vZGh7zGUoZlwqG4PfWr2vKjSz41XrfgqkeMwoFZlTCrrMNoA==}
engines: {node: '>= 16'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: false
optional: true
/nodejs-polars-win32-x64-msvc@0.11.0:
resolution: {integrity: sha512-MF3rVxabCAy6GJ+ohaeCsGUn3pjOlHwjj0iCgjHxdJDvmXpNl2TTFqGMijicDqsRbv/TKt90o6QUrBZl94MQJQ==}
engines: {node: '>= 16'}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: false
optional: true
/nodejs-polars@0.11.0:
resolution: {integrity: sha512-rLhYkhcMCGrRXSUOVt+wskNiqaSapEWpo7hPlhQvEFkjcn4NPO/0RPHswGezOdIgQ3h778jpNkIXQjxdD5bXdA==}
engines: {node: '>= 18'}
optionalDependencies:
nodejs-polars-android-arm64: 0.11.0
nodejs-polars-darwin-arm64: 0.11.0
nodejs-polars-darwin-x64: 0.11.0
nodejs-polars-linux-arm64-gnu: 0.11.0
nodejs-polars-linux-arm64-musl: 0.11.0
nodejs-polars-linux-x64-gnu: 0.11.0
nodejs-polars-linux-x64-musl: 0.11.0
nodejs-polars-win32-x64-msvc: 0.11.0
dev: false
/normalize-path@3.0.0:
resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
engines: {node: '>=0.10.0'}