Software engineering facts, information, and skills categorized as SQL

Clone a sqlalchemy db object with new primary key

Varghese Chacko 1 year, 2 months ago

At many points, a developer may want to clone a row of data for multiple reason. TheSQL Alchemy makeit easy to do in 5 steps. For example we have a table products and clone the product with id 25.

Search database with regular expression in Django

Varghese Chacko 1 year, 2 months ago

Regex and iregex are  the two field lookups that enable us to search database with regular expressions. regex is case-sensitive where as iregexis case-insensitive.

Django field lookup - exact and iexact

Varghese Chacko 1 year, 2 months ago

Field lookups are how we specify the conditions in the WHERE clause of an SQL. They are specified as keyword arguments for QuerySet methodslikefilter(), exclude() and get().

Export results of SQLs from Heroku using Data Clips

Varghese Chacko 1 year, 3 months ago

Heroku comes with nice database backup tools, both commandline and web based. But how to export results of an SQL query?