New field type with custom sql conversion
See original GitHub issueI’m using trunk and some coffee I had running with the latest 2.x from pypi is no longer working. I’m implementing a Field for postgis point geometry. My conversation function to python used
q=SelectQuery(self.model_type, fn.ST_X(value).alias('x'), fn.ST_Y(value).alias('y'))
r=q.first_row()
return r.x, r.y
I can’t get your working now. Is there an equivalent? Or a better way? If prefer to have the initial select do the conversation instead of a second select query.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
SQL queries to change the column type
This article will show the way to change the data type of the columns in SQL Server 2019, MySQL Server, and PostgreSQL.
Read more >changing datatype of the fields in custom SQL
I need to convert CLOB data type in Tableau. Is it possible using Custom SQL or initial SQL and also in CLOB there...
Read more >Migrate custom field values for type change through SQL query?
Hello, I usually use CSV or ScriptRunner's built in script for copying custom field values, but I need to do a migration for...
Read more >Advanced field value conversion using custom mapping types
We create a simple entity with a field $point which holds a value object Point representing the latitude and longitude of the position....
Read more >Custom data type conversion - jOOQ
jOOQ also allows for generated source code to reference your own custom converters, in order to permanently replace a table column's <T> type...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Bro are you high? Do you english?
I understand that it’s inefficient, I’m trying to figure out how to make the ORM do it in a single select and automatically populate the object. The context is something like: ` class Bar(Model): id = IntegerField(primary_key=True)
class Foo(Model): bbox = BoxField() # this is the custom field with the bbox accessor bar = ForeignKey(Bar, backref=“foo”)
…
tmp = Bar.get(id=my_bar_id) json.dumps(model_to_dict(tmp))