|
1925 | 1925 | }
|
1926 | 1926 | ],
|
1927 | 1927 | "source": [
|
1928 |
| - "result = session.query(Customers).filter(Customers.id>2)\n", |
| 1928 | + "result = session.query(Customers).filter(Customers.id > 2)\n", |
1929 | 1929 | "\n",
|
1930 | 1930 | "for row in result:\n",
|
1931 | 1931 | " print (\"ID:\", row.id, \"Name: \",row.name, \"Address:\",row.address, \"Email:\",row.email)"
|
|
2046 | 2046 | }
|
2047 | 2047 | ],
|
2048 | 2048 | "source": [
|
2049 |
| - "result = session.query(Customers).filter(Customers.id>2, Customers.name.like('Ra%'))\n", |
| 2049 | + "result = session.query(Customers).filter(Customers.id > 2, Customers.name.like('Ra%'))\n", |
2050 | 2050 | "\n",
|
2051 | 2051 | "for row in result:\n",
|
2052 | 2052 | " print (\"ID:\", row.id, \"Name: \",row.name, \"Address:\",row.address, \"Email:\",row.email)"
|
|
2070 | 2070 | ],
|
2071 | 2071 | "source": [
|
2072 | 2072 | "from sqlalchemy import and_\n",
|
2073 |
| - "result = session.query(Customers).filter(and_(Customers.id>2, Customers.name.like('Ra%')))\n", |
| 2073 | + "result = session.query(Customers).filter(and_(Customers.id > 2, Customers.name.like('Ra%')))\n", |
2074 | 2074 | "\n",
|
2075 | 2075 | "for row in result:\n",
|
2076 | 2076 | " print (\"ID:\", row.id, \"Name: \",row.name, \"Address:\",row.address, \"Email:\",rorow.email)"
|
|
2096 | 2096 | ],
|
2097 | 2097 | "source": [
|
2098 | 2098 | "from sqlalchemy import or_\n",
|
2099 |
| - "result = session.query(Customers).filter(or_(Customers.id>2, Customers.name.like('Ra%')))\n", |
| 2099 | + "result = session.query(Customers).filter(or_(Customers.id > 2, Customers.name.like('Ra%')))\n", |
2100 | 2100 | "\n",
|
2101 | 2101 | "for row in result:\n",
|
2102 | 2102 | " print (\"ID:\", row.id, \"Name: \",row.name, \"Address:\",row.address, \"Email:\",row.email)"
|
|
2433 | 2433 | ],
|
2434 | 2434 | "metadata": {
|
2435 | 2435 | "kernelspec": {
|
2436 |
| - "display_name": "Python 3", |
| 2436 | + "display_name": "Python 3 (ipykernel)", |
2437 | 2437 | "language": "python",
|
2438 | 2438 | "name": "python3"
|
2439 | 2439 | },
|
|
2447 | 2447 | "name": "python",
|
2448 | 2448 | "nbconvert_exporter": "python",
|
2449 | 2449 | "pygments_lexer": "ipython3",
|
2450 |
| - "version": "3.7.6" |
| 2450 | + "version": "3.8.10" |
2451 | 2451 | }
|
2452 | 2452 | },
|
2453 | 2453 | "nbformat": 4,
|
|
0 commit comments