Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
universal-sql-builder
Create sql query with the help of sql builder magic function help to make automatic sql query its help in build sql query string for Microsoft SQL, MySql, SqlLite, PostgreSQL, ORACLE, Apache Hive, Django, FLASK, HBASE and Apache Spark etc.
Readme
SQL framework ORM independent, it helps you build sql query in python
What ever you using Hive, HBase, Spark* SQL, Django & FLASK etc so you can gernate simple SQL query
Its return raw sql query string this can be use in any Framework
from UniversalSqlBuilder import UniversalSqlBuilder
UniversalSqlBuilder.table("employee").select("id,name").select(",department").get()
UniversalSqlBuilder.table("employee").select("id,name").select(",department").where("ram=(select id from users)").where("city=", "delhi").get()
whereBetween("age",[200,300])
UniversalSqlBuilder.table("employee").select("id,name").whereBetween("age",[200,300]).get()
UniversalSqlBuilder.table("employee").select("id,name").orWhere("seller=",'100').get()
UniversalSqlBuilder.table("employee").select("id,name").groupBy("name").get()
Use order by : orderBy("ID","desc")
UniversalSqlBuilder.table("employee").select("id,name").orderBy("ID","desc").get()
use with limit : limit(10,20)
UniversalSqlBuilder.table("employee").select("id,name").limit(10,20).get()
join("users","users.id=employee.emp_id")
FULL OUTER : join("users","users.id=employee.emp_id","FULL OUTER")
INNER : join("users","users.id=employee.emp_id","INNER")
LEFT : join("users","users.id=employee.emp_id","LEFT")
RIGHT : join("users","users.id=employee.emp_id","RIGHT")
JOIN : join("users","users.id=employee.emp_id","JOIN")
UniversalSqlBuilder.table("employee").select("id,name").orHaving("seller=",'100').get()
UniversalSqlBuilder.table("employee").select("id,name").select(",department").having("id=(select id from users)").having("city=", "delhi").get()
print(UniversalSqlBuilder.table("employee")
.select("id,name")
.select(",department")
.where("city=", "delhi")
.where("order_id=("+UniversalSqlBuilder.table("orders as temp").select("temp.id").orderBy("temp.id", "desc").get()+")")
.orWhere("seller=", '100')
.orWhere("brand=", 'rock')
.having("city=", "delhi")
.orHaving("seller=", '100')
.orHaving("brand=", 'rock')
.whereBetween("age", [200, 300])
.join("users", "users.id=employee.emp_id", "left")
.join("cars", "cars.id=employee.emp_id")
.groupBy("name")
.orderBy("ID", "desc")
.limit(10, 20).get())
FAQs
Create sql query with the help of sql builder magic function help to make automatic sql query its help in build sql query string for Microsoft SQL, MySql, SqlLite, PostgreSQL, ORACLE, Apache Hive, Django, FLASK, HBASE and Apache Spark etc.
We found that universal-sql-builder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.