Comments (7)
It is not the JOIN
that is failing but the duplicated id
field (rank.id
and daily.id
will result in 2 fields with the same name - id
).
The view validation errors will be improved in the future, but for now you can try specifying an alias (eg. daily.id as dailyId
).
If that doesn't help, feel free to let me know I'll to investigate it tomorrow.
from pocketbase.
Wow what a fast answer ! Yes that does solve the format problem but the other one remains, the cross join isn't being made I only get each row of the first collection (with additional columns for the first row of the second one).
In any case, I was able to find a solution to my use case using nested selects. Thank you very much!
from pocketbase.
but the other one remains, the cross join isn't being made I only get each row of the first collection
This will depend on your query and data structure. The easiest way to rule out PocketBase issue is to run your query against the pb_data/data.db
file using the sqlite3
cli:
sqlite3 ./pb_data/data.db 'your query'
If you have other questions please open a new Q&A discussions as the threaded format is more suitable for this.
from pocketbase.
It works fine using the sqlite cli, you can try anything using a cross join and the bug will appear.
SELECT table1.id, table2.id as other_id FROM table1 CROSS JOIN table 2
from pocketbase.
I'm not able to reproduce it. I've just tested it locally and both produce the same result.
Once the query is saved it is executed as plain View by the specific SQLite driver (if CGO is enabled mattn/go-sqlite3, otherwise modernc.org/sqlite).
Additionally I don't understand what is the purpose of the cross join in your case especially when there is no explicit ON
constraint.
I don't think I can help you further but if you have further questions please open a Q&A discussion with more details about your use case, what you are trying to do and an export of your collections configuration (Admin UI > Settings > Export collections).
from pocketbase.
Related Issues (20)
- `$os.readFile` and `$os.getwd` use `/` as working directory in production enviroment HOT 4
- Feature Request: is there is any way to make our own Custome storage system. HOT 1
- Proposal: Switch to LumoSQL HOT 1
- Issue with Hour Field Not Triggering in CronJob Registration HOT 1
- Querying Auth Record from a PB Hook does not return the email field, if the user has emailVisibility set to false HOT 1
- Extending with JS: Object access within DynamicModel not ergonomic? HOT 2
- How to expand ModelQuery results?
- JSON fields not showing in admin item drill-down HOT 2
- Problem with operator: `?=` HOT 2
- Admin interface loads slowly because of the created field HOT 1
- How can I filter a date using the equal = operator ? HOT 2
- Is it possible to clear out all records leaving the structure intact?
- Proposal: Add a POST log's route HOT 3
- Is it possible to override default console output
- Proposal: automatically load custom certificates from /pb_certificates HOT 1
- [Feature] Add a 'Duplicate' option to the selected record in the Admin UI HOT 1
- Feature Request: RSA Token/ minting record in token for M2M auth HOT 1
- Incorrect file name mangling with dual extensions files HOT 3
- Sending multiple emails in one cron hook was not completed without error message HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pocketbase.