SQLAlchemy Core – Using Textual SQL SQLAlchemy lets you just use strings, for those cases when the SQL is already known and there isn’t a strong need for the statement to support dynamic features. The text() construct is used to compose a textual statement that is passed to the database mostly unchanged. It constructs a […]
Category Archives: sqlalchemy
SQLAlchemy Core – Selecting Rows In this chapter, we will discuss about the concept of selecting rows in the table object. The select() method of table object enables us to construct SELECT expression. s = students.select() The select object translates to SELECT query by str(s) function as shown below − ”SELECT students.id, students.name, students.lastname FROM […]
SQLAlchemy Core – Connecting to Database In the previous chapter, we have discussed about expression Language in SQLAlchemy. Now let us proceed towards the steps involved in connecting to a database. Engine class connects a Pool and Dialect together to provide a source of database connectivity and behavior. An object of Engine class is instantiated […]