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.

Feature request: field type "list:float" or "list:double"

See original GitHub issue

The only databases I’m really familiar with are MySQL, and SQLite, but I can’t think of any technical reasons why a “list:double” type can’t work just like “list:integer” does. Seems like a bit of an oversight that there isn’t already such a type. It looks like I should be able to simply:

  • Add a method bar_decode_double(value) in helpers/methods.py
  • Add a method ListsParser._list_doubles(self, value) in parsers/base.py
  • Add two methods, SQLDialect.type_list_double(self) and NoSQLDialect.type_list_double(self), in dialects/base.py
  • Add two methods, BaseRepresenter._list_double(self, value) and NoSQLRepresenter._list_double(self, value), in representers/base.py

If there aren’t any technical objections, I’ll make a fork and start working on adding a “list:double” type, and then issue a pull request. If I’m missing anything obvious, let me know.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mdipierrocommented, Jul 7, 2016

Let’s here some more opinions on web2py developer about this. If other developers disagree with me, I am not vetoing this. I am just explaining why I never needed and I tend to prefer not to add things that can be done in other ways.

0reactions
Kopachriscommented, Jun 22, 2017

No objection

Read more comments on GitHub >

github_iconTop Results From Across the Web

XML Schema Part 2: Datatypes Second Edition - W3C
[Definition:] The double datatype is patterned after the IEEE double-precision 64-bit floating point type [IEEE 754-1985]. The basic ·value ...
Read more >
11. Lists — How to Think Like a Computer Scientist
The elements of a list don't have to be the same type. The following list contains a string, a float, an integer, and...
Read more >
Field data types | Elasticsearch Guide [8.5] | Elastic
Numbers: Numeric types, such as long and double , used to express amounts. ... In Elasticsearch, arrays do not require a dedicated field...
Read more >
Field types - Product Documentation | ServiceNow
These field types are available to administrators when creating new fields or changing the type of existing fields.
Read more >
Data Types and Schemas — Apache Arrow v10.0.1
Create double-precision floating point type. ... Concrete class for list data types. ... Return True if value is an instance of a large...
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