question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Between Operators keep find Operation lasting forever

See original GitHub issue

Issue type:

[ x] bug report [ ] feature request [ ] documentation issue

Database system/driver:

[ ] cordova [ ] mongodb [ ] mssql [ ] mysql / mariadb [ ] oracle [ ] postgres [ ] cockroachdb [x] sqlite [ ] sqljs [ ] react-native [ ] expo

TypeORM version:

[ ] latest [ ] @next [x] github:cuibonobo/typeorm-package

Steps to reproduce or a small repository showing the problem:

  1. Create a React-Native App and install this Typeorm, because default one not working with SQLite. Try to search with a where following a Between Statement like this:
const result = await repo.findAll(
                  {
                    where: {
                      leaveDate: Between(
                        formValue.from,
                        formValue.to,
                      ),
                    },
                    order: { lastname: "ASC" },
                  },
                );
  1. Put this in an Async Function and put a statement after it, it will never gets executed.

I use the Custom Version because the default one never worked for me. Just keeped asking for react-native-sqlite-storage which was already installed!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:27 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
leonardofalkcommented, Oct 22, 2020
1reaction
imnotjamescommented, Oct 22, 2020

typeorm import will go to different things depending on how you’ve configured your bundler. metro SHOULD use the browser fields by default.

https://github.com/typeorm/typeorm/issues/6839#issuecomment-706673256

I replaced all references to typeorm/browser with just typeorm. EG import TypeORM from "typeorm";

I updated the metro.config.js to contain the following:

module.exports = {
  transformer: {
    getTransformOptions: async () => ({
        resolver: {
            resolverMainFields: ['browser', 'main']
        },
      transform: {
        experimentalImportSupport: false,
        inlineRequires: false,
      },
    }),
  },
};

Thing is, for the resolverMainFields - that’s the default. So it should be using that already.

Not saying this fixes your problem but it might help. I’ll still try to grab the repo down in the next few days if you haven’t resolved it by then 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

DATE queries using BETWEEN - Ask TOM
Always compare strings to string and dates to dates! toms rule #2: stop using YY, just stop -- now, forever!!!. Always use to_date...
Read more >
Learn RxJS switchMap, mergeMap, concatMap and ... - Medium
Learn RxJS switchMap, mergeMap, concatMap and exhaustMap, FOREVER! 😎 to give a talk called:
Read more >
What Do the Operators LIKE and NOT LIKE Do?
The SQL LIKE and NOT LIKE operators are used to find matches between a string and a given pattern. They are part of...
Read more >
Kubernetes Operators Best Practices - Red Hat Hybrid Cloud
This document presents a set of best practices to keep in mind when designing and developing operators using the Operator SDK.
Read more >
Conditionals and logic | Think Java | Trinket
You are probably familiar with these operations, but notice that the Java operators are different from the mathematical symbols like =, ≠, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found