Comments (15)
In GitLab by @manuelma on Nov 28, 2018, 17:37
mentioned in commit b4da5d8
from spine-database-api.
In GitLab by @manuelma on Nov 28, 2018, 17:38
@PvPer checkout last dev, might just work. At least committing small changes isn't badly broken.
from spine-database-api.
In GitLab by @manuelma on Nov 28, 2018, 17:39
changed title from Handle {-maximum number of sql variables in an expression is 1000-} to Handle {+ the 'maximum number of sql variables in an expression is 1000' error+}
from spine-database-api.
In GitLab by @PvPer on Nov 29, 2018, 13:29
mentioned in commit c293f2c
from spine-database-api.
In GitLab by @PvPer on Nov 29, 2018, 13:29
mentioned in commit c48e188
from spine-database-api.
In GitLab by @PvPer on Nov 29, 2018, 13:30
n = 999
seemed to do the trick.
Added two tests about this.
Every add method will have the same problem if you try to get all new parameter values. See test_insert_and_retrive_many_objects
in the tests
from spine-database-api.
In GitLab by @fabianoP on Dec 4, 2018, 12:50
My limit is 499
from spine-database-api.
In GitLab by @manuelma on Dec 4, 2018, 12:56
ok, so we need to find a way to query the limit
from spine-database-api.
In GitLab by @fabianoP on Dec 4, 2018, 13:01
I think the problem is in the "IN" clause,the good workaround in this case is using a pagination technique. Basically what we do is we limit the data view by users dividing the views in pages of 100-400 records max. In this way we will never show more than the max number of record in a page.
A bit more like SQL workbench where the user in the interface cannot see more than 100 rows at the same time, then when it scrolls it will load the next 5 following pages.
Was I clear or was a messy explanation?
from spine-database-api.
In GitLab by @manuelma on Dec 4, 2018, 13:12
It's clear, although this issue is not about viewing data, but rather about querying data for other purposes. Take a look at the commit_session
method in DiffDatabaseMapping
class when you have the chance. We're trying to fetch all records that have been modified by the user using the diff
tables, so we can apply the changes on the original tables. I think the current solution is fine as long as we can find out the right limit.
from spine-database-api.
In GitLab by @fabianoP on Dec 4, 2018, 13:24
I got it. Thanks!
from spine-database-api.
In GitLab by @manuelma on Dec 4, 2018, 13:33
Cool, and you have any idea how to find out this limit for a given engine/session/dialect?
from spine-database-api.
In GitLab by @fabianoP on Dec 4, 2018, 13:43
Need to do some test, but I think creating a temporary table and using an inner join could fix the problem:
from spine-database-api.
In GitLab by @manuelma on Dec 4, 2018, 15:47
I don't see how that solution works. We still need to select the items from the original table to insert them in the temporary table, and for that we need the IN clause. The solution we have now is almost good, we just need to figure out the right limit. We can hard-code the limit to 499 to be safe, or even to something like 99 if we want to be ultra-safe. Alternatively, we could run a mock-up query to figure out what the limit is for a particular case.
Edit: or am I missing something???
from spine-database-api.
@manuelma is this issue still valid?
from spine-database-api.
Related Issues (20)
- Restablish unique key 'name' for entity_class
- Parameter values as Apache Arrow objects HOT 4
- Can't trust legacy tool/feature/method for compatibility transformations
- Write type information for simple types as well
- Rollback purge HOT 1
- Add Toolbox tests to GitHub actions? HOT 3
- Parameter value format documentation is missing index_name
- Wrong results after changing a filter
- Make sure TempId travel safely across the socket (DB server)
- The tool filter only works with 1 tool activated
- No entity can pass its tool filter when there are multiple `tool_feature_method`s HOT 1
- Fix broken example in parameter_value API documentation
- Guidelines on what to import in __init__.py
- Improve parsing performance by accepting only ISO 8601 time stamps HOT 2
- Check that CHANGELOG.md is up-to-date for 0.8-dev HOT 1
- Compatibility transformation should keep working after the first time HOT 1
- Alternative filter does not filter by entity alternatives
- Trying to get a parameter value that does not exist Tracebacks
- Mention the difference between entity_byname and element_name_list in documentation HOT 2
- Support EPS Value in GDX Exporter HOT 2
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 spine-database-api.