gms1 / node-sqlite3-orm Goto Github PK
View Code? Open in Web Editor NEWORM for SQLite and TypeScript/JavaScript
License: MIT License
ORM for SQLite and TypeScript/JavaScript
License: MIT License
mapbox/node-pre-gyp is just a build tool required by mapbox/node-sqlite3, so we are not going to execute any untrusted code
https://snyk.io/test/github/gms1/node-sqlite3-orm?severity=high&severity=medium&severity=low
unclechu/node-deep-extend#39
I am new to using SQLite. What are the first steps to getting started?
When I know what I am doing I can provide a PR for the getting started doc that could also help others.
My initial goal is to investigate using SQLite with Ionic using promises/observables...
The change from gulp to webpack affects testing.
How do I run a specific test?
To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:
.travis.yml
If youβre interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.
Greenkeeper has checked the engines
key in any package.json
file, the .nvmrc
file, and the .travis.yml
file, if present.
engines
was only updated if it defined a single version, not a range..nvmrc
was updated to Node.js 10.travis.yml
was only changed if there was a root-level node_js
that didnβt already include Node.js 10, such as node
or lts/*
. In this case, the new version was appended to the list. We didnβt touch job or matrix configurations because these tend to be quite specific and complex, and itβs difficult to infer what the intentions were.For many simpler .travis.yml
configurations, this PR should suffice as-is, but depending on what youβre doing it may require additional work or may not be applicable at all. Weβre also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, Iβm a humble robot and wonβt feel rejected π€
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
mapbox/node-pre-gyp is just a build tool required by mapbox/node-sqlite3, so we are not going to execute any untrusted code
waiting for mapbox/node-pre-gyp#346 to be resolved
keeping this non-issue open
Possible solution in PR #40
IΒ΄m using node-sqlite3-orm for my database and IΒ΄m in need of those. Are they already implemented or will they follow in one of the next versions? If they are already implemented how do I use them?
Is it possible to implement a replace into using BaseDAO
?
I know I can query / update or create, but it would be nice if we could use a REPLACE INTO instead of an INSERT INTO
I'm seeing this error now. Did something change in DefinitelyTyped?
node_modules/sqlite3orm/core/SqlDatabase.d.ts(25,20): error TS2709: Cannot use namespace 'Database' as a type.
node_modules/sqlite3orm/core/SqlStatement.d.ts(21,23): error TS2709: Cannot use namespace 'Statement' as a type.
peter@Merry-Christmas MINGW64 /c/ae/node-sqlite3-orm (aedev)
$ gulp test
[22:09:27] mode: development
[22:09:27] Using gulpfile C:\ae\node-sqlite3-orm\gulpfile.js
[22:09:27] Starting 'dist:packageJson'...
[22:09:27] Starting 'dist:copyFiles'...
[22:09:27] Starting 'ts:tsc'...
[22:09:27] Starting 'ts:lint'...
[22:09:28] Finished 'dist:packageJson' after 521 ms
[22:09:28] Finished 'dist:copyFiles' after 519 ms
[22:09:28] Starting 'dist:files'...
[22:09:28] Finished 'dist:files' after 46 ΞΌs
[22:09:30] Finished 'ts:lint' after 2.92 s
[22:09:31] Finished 'ts:tsc' after 3.41 s
[22:09:31] Starting 'build'...
[22:09:31] Finished 'build' after 6.85 ΞΌs
[22:09:31] Starting 'test'...
Jasmine started
test BaseDAO
β expect basic functionality (insert/update/delete/selectOne/selectAll) to work
β expect foreign key select to work
test boolean type
β expect writing boolean properties to the database to succeed
β expect reading boolean properties from database to succeed
test Date type
β expect writing Date properties to the database to succeed
β expect reading Date properties from database to succeed
test Json data
β expect reading/writing Json properties from/to the database to succeed
test README sample
β expect README sample to succeed
test schema
β expect meta-data to be defined
β expect create/drop/alter-table to work (using Schema)
β expect create/drop/alter-table to work (using BaseDAO)
test SqlConnectionPool
Γ expect pool to be able to open a database
- Failed: SQLITE_CANTOPEN: unable to open database file
test SqlDatabase
β expect insert without parameter to succeed
β expect insert without parameter to violate unique constraint
β expect insert without primary key to succeed
β expect update with parameter to succeed
β expect prepared update with parameter to succeed
β expect select without parameter to succeed
β expect select with parameter to succeed
β expect getting and setting PRAGMA user_version to succeed
β expect transaction to commit on end
β expect transaction to rollback on error
**************************************************
* Failures *
**************************************************
1) test SqlConnectionPool expect pool to be able to open a database
- Failed: SQLITE_CANTOPEN: unable to open database file
Executed 22 of 22 specs (1 FAILED) in 0.057 sec.
[22:09:31] 'test' errored after 251 ms
[22:09:31] Error in plugin 'gulp-jasmine'
Message:
Tests failed
3.3.9
to 3.3.10
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@types/jasmine is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
5.0.5
to 5.1.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@types/fs-extra is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Branch | Build failing π¨ |
---|---|
Dependency | @types/node |
Current Version | 7.0.25 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As @types/node is βonlyβ a devDependency of this project it might not break production or downstream projects, but βonlyβ your build or test tools β preventing new deploys or publishes.
I recommend you give this issue a high priority. Iβm sure you can resolve this πͺ
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot π΄
14.0.0
to 14.1.0
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
nyc is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 15 commits.
c5d90fa
chore(release): 14.1.0
5cc05f4
chore: Update dependencies
1e39ae1
chore: Refresh snapshots, update test/config-override.js to use helpers (#1085)
3d9eaa4
fix: Purge source-map cache before reporting if cache is disabled. (#1080)
132a074
feat: Add support for env.NYC_CONFIG_OVERRIDE (#1077)
6fc109f
chore: node.js 12 compatibility for object snapshot test. (#1084)
a7bc7ae
fix: Use correct config property for parser plugins (#1082)
600c867
chore: Convert some tap tests to run parallel and use snapshots. (#1075)
56591fa
docs: instrument docs update [skip ci] (#1063)
ca84c42
docs(codecov): favour npx over installing locally [skip ci] (#1074)
85c1eac
chore: Add test for nyc --no-clean
. (#1071)
21fb2c8
fix: Exit with code 1 when nyc doesn't know what to do. (#1070)
0f745ca
chore: Use class to declare NYC (#1069)
ca37ffa
feat: add support for yaml configuration file (#1054)
c4fcf5e
fix: Do not crash when nyc is run inside itself. (#1068)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
Introduced through: [email protected] βΊ [email protected] βΊ [email protected] βΊ [email protected]
as can be seen this is a compile-time rather than run-time dependency!
waiting for
isaacs/chownr#2
7.0.0
to 7.0.1
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
fs-extra is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
The new version differs by 7 commits.
a32c852
7.0.1
6392917
Temporarily disable standard-markdown
ddc1a2f
Fix removeSync() to eliminate spurious ENOTEMPTY errors on Windows (#646)
ab254b1
Added docs/ and CHANGELOG.md to .npmignore (#642) (#643)
287f234
Fix typo in docs (#628)
402c1d0
Show support for mode (#587)
4da17fe
Chore: github issue template (#617)
See the full diff
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
10.12.0
to 10.12.1
.π¨ View failing branch.
This version is covered by your current version range and after updating it in your project the build failed.
@types/node is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.
There is a collection of frequently asked questions. If those donβt help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot π΄
I have a field defined as:
@field({ name: 'tts_title_loaded' })
ttsTitleLoaded: boolean = false;
I'm trying to search for ttsTitleLoaded == false
.
This works:
const podcastQuery = new QueryModel(Podcast);
const podcasts = await podcastQuery.selectAll(await this.sqldb, {
where: {
not: { ttsTitleLoaded: true },
},
});
but this does not:
const podcastQuery = new QueryModel(Podcast);
const podcasts2 = await podcastQuery.selectAll(await this.sqldb, {
where: {
ttsTitleLoaded: false,
},
});
Is that expected?
Planning to update getting-started and got the error while running tests.
C:\ae\aedev\node-sqlite3-orm>npm test
> [email protected] test C:\ae\aedev\node-sqlite3-orm
> npm run build && npm run test:run
> [email protected] build C:\ae\aedev\node-sqlite3-orm
> tsc -p tsconfig.json
src/sqlite3orm/AutoUpgrader.ts:2:23 - error TS7016: Could not find a declaration file for module 'debug'. 'C:/ae/aedev/node-sqlite3-orm/node_modules/debug/src/index.js' implicitly has an 'any' type.
Try `npm install @types/debug` if it exists or add a new declaration (.d.ts) file containing `declare module 'debug';`
2 import * as _dbg from 'debug';
~~~~~~~
src/sqlite3orm/core.ts:2:23 - error TS7016: Could not find a declaration file for module 'debug'. 'C:/ae/aedev/node-sqlite3-orm/node_modules/debug/src/index.js' implicitly has an 'any' type.
Try `npm install @types/debug` if it exists or add a new declaration (.d.ts) file containing `declare module 'debug';`
2 import * as _dbg from 'debug';
~~~~~~~
src/sqlite3orm/SqlConnectionPool.ts:4:23 - error TS7016: Could not find a declaration file for module 'debug'. 'C:/ae/aedev/node-sqlite3-orm/node_modules/debug/src/index.js' implicitly has an 'any' type.
Try `npm install @types/debug` if it exists or add a new declaration (.d.ts) file containing `declare module 'debug';`
4 import * as _dbg from 'debug';
~~~~~~~
src/sqlite3orm/SqlDatabase.ts:4:23 - error TS7016: Could not find a declaration file for module 'debug'. 'C:/ae/aedev/node-sqlite3-orm/node_modules/debug/src/index.js' implicitly has an 'any' type.
Try `npm install @types/debug` if it exists or add a new declaration (.d.ts) file containing `declare module 'debug';`
4 import * as _dbg from 'debug';
~~~~~~~
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: `tsc -p tsconfig.json`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\peter\AppData\Roaming\npm-cache\_logs\2018-08-06T03_52_02_567Z-debug.log
npm ERR! Test failed. See above for more details.
C:\ae\aedev\node-sqlite3-orm>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.