[{"data":1,"prerenderedAt":6987},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/work-databases":601},[4,22,31,40,49,58,67,76,86,94,103,112,121,130,139,148,158,167,176,185,194,203,212,222,231,240,249,258,267,276,285,297,306,315,324,333,342,351,362,371,380,389,398,407,418,427,436,445,454,463,472,483,492,501,510,519,528,539,548,557,566,575,584,593],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python-how-to/string-manipulation","python-how-to",false,"","String Manipulation","Learn essential string manipulation techniques in Python","string-manipulation",1,true,"pi pi-folder","markdown","content:python-how-to:1.string-manipulation.md","content","python-how-to/1.string-manipulation.md","python-how-to/1.string-manipulation","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python-how-to/split-join-strings","Split and Join Strings","Learn how to split strings into lists and join lists back into strings in Python","split-join-strings",2,"content:python-how-to:2.split-join-strings.md","python-how-to/2.split-join-strings.md","python-how-to/2.split-join-strings",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python-how-to/remove-whitespace","Remove Whitespace","Learn how to clean up and remove unwanted whitespace from strings in Python","remove-whitespace",3,"content:python-how-to:3.remove-whitespace.md","python-how-to/3.remove-whitespace.md","python-how-to/3.remove-whitespace",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python-how-to/find-replace-text","Find and Replace Text","Learn how to search for and replace text within strings in Python","find-replace-text",4,"content:python-how-to:4.find-replace-text.md","python-how-to/4.find-replace-text.md","python-how-to/4.find-replace-text",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python-how-to/check-string-content","Check String Content","Learn how to validate and check the content of strings in Python","check-string-content",5,"content:python-how-to:5.check-string-content.md","python-how-to/5.check-string-content.md","python-how-to/5.check-string-content",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python-how-to/format-strings","Format Strings","Learn how to format strings in Python using f-strings and format() method","format-strings",6,"content:python-how-to:6.format-strings.md","python-how-to/6.format-strings.md","python-how-to/6.format-strings",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python-how-to/unicode-special-chars","Handle Unicode and Special Characters","Learn how to work with Unicode and special characters in Python strings","unicode-special-chars",7,"content:python-how-to:7.unicode-special-chars.md","python-how-to/7.unicode-special-chars.md","python-how-to/7.unicode-special-chars",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python-how-to/list-operations","List Operations","Learn essential operations for working with lists in Python","list-operations",8,"content:python-how-to:8.list-operations.md","python-how-to/8.list-operations.md","python-how-to/8.list-operations",[86,94,103,112,121,130,139],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":81,"_type":15,"_id":91,"_source":17,"_file":92,"_stem":93,"_extension":20},"/python-how-to/sort-lists","Sort Lists","Learn how to sort lists in Python using different methods and custom sorting","sort-lists","content:python-how-to:9.sort-lists.md","python-how-to/9.sort-lists.md","python-how-to/9.sort-lists",{"_path":95,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":96,"description":97,"slug":98,"parentId":77,"order":99,"_type":15,"_id":100,"_source":17,"_file":101,"_stem":102,"_extension":20},"/python-how-to/remove-duplicates","Remove Duplicates","Learn how to remove duplicate elements from lists in Python","remove-duplicates",10,"content:python-how-to:10.remove-duplicates.md","python-how-to/10.remove-duplicates.md","python-how-to/10.remove-duplicates",{"_path":104,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":105,"description":106,"slug":107,"parentId":77,"order":108,"_type":15,"_id":109,"_source":17,"_file":110,"_stem":111,"_extension":20},"/python-how-to/filter-lists","Filter Lists","Learn how to filter lists in Python using different methods","filter-lists",11,"content:python-how-to:11.filter-lists.md","python-how-to/11.filter-lists.md","python-how-to/11.filter-lists",{"_path":113,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":114,"description":115,"slug":116,"parentId":77,"order":117,"_type":15,"_id":118,"_source":17,"_file":119,"_stem":120,"_extension":20},"/python-how-to/combine-lists","Combine Lists","Learn different methods to combine lists in Python","combine-lists",12,"content:python-how-to:12.combine-lists.md","python-how-to/12.combine-lists.md","python-how-to/12.combine-lists",{"_path":122,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":123,"description":124,"slug":125,"parentId":77,"order":126,"_type":15,"_id":127,"_source":17,"_file":128,"_stem":129,"_extension":20},"/python-how-to/list-comprehensions","Use List Comprehensions","Learn how to create and transform lists efficiently using Python's list comprehension syntax","list-comprehensions",13,"content:python-how-to:13.list-comprehensions.md","python-how-to/13.list-comprehensions.md","python-how-to/13.list-comprehensions",{"_path":131,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":132,"description":133,"slug":134,"parentId":77,"order":135,"_type":15,"_id":136,"_source":17,"_file":137,"_stem":138,"_extension":20},"/python-how-to/nested-lists","Work with Nested Lists","Learn how to work with nested lists (2D arrays) in Python","nested-lists",14,"content:python-how-to:14.nested-lists.md","python-how-to/14.nested-lists.md","python-how-to/14.nested-lists",{"_path":140,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":141,"description":142,"slug":143,"parentId":77,"order":144,"_type":15,"_id":145,"_source":17,"_file":146,"_stem":147,"_extension":20},"/python-how-to/enumerate-zip","Use enumerate() and zip()","Learn how to use enumerate() and zip() for efficient iteration in Python","enumerate-zip",15,"content:python-how-to:15.enumerate-zip.md","python-how-to/15.enumerate-zip.md","python-how-to/15.enumerate-zip",{"_path":149,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":150,"description":151,"slug":152,"order":153,"isParent":13,"icon":14,"_type":15,"_id":154,"_source":17,"_file":155,"_stem":156,"_extension":20,"children":157,"expanded":13},"/python-how-to/dictionary-operations","Dictionary Operations","Learn essential operations for working with dictionaries in Python","dictionary-operations",16,"content:python-how-to:16.dictionary-operations.md","python-how-to/16.dictionary-operations.md","python-how-to/16.dictionary-operations",[158,167,176,185,194,203],{"_path":159,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":160,"description":161,"slug":162,"parentId":149,"order":163,"_type":15,"_id":164,"_source":17,"_file":165,"_stem":166,"_extension":20},"/python-how-to/merge-dictionaries","Merge Dictionaries","Learn different methods to merge dictionaries in Python","merge-dictionaries",17,"content:python-how-to:17.merge-dictionaries.md","python-how-to/17.merge-dictionaries.md","python-how-to/17.merge-dictionaries",{"_path":168,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":169,"description":170,"slug":171,"parentId":149,"order":172,"_type":15,"_id":173,"_source":17,"_file":174,"_stem":175,"_extension":20},"/python-how-to/sort-dictionaries","Sort Dictionaries","Learn how to sort dictionaries by keys or values in Python","sort-dictionaries",18,"content:python-how-to:18.sort-dictionaries.md","python-how-to/18.sort-dictionaries.md","python-how-to/18.sort-dictionaries",{"_path":177,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":178,"description":179,"slug":180,"parentId":149,"order":181,"_type":15,"_id":182,"_source":17,"_file":183,"_stem":184,"_extension":20},"/python-how-to/filter-dictionaries","Filter Dictionaries","Learn how to filter dictionaries based on keys or values in Python","filter-dictionaries",19,"content:python-how-to:19.filter-dictionaries.md","python-how-to/19.filter-dictionaries.md","python-how-to/19.filter-dictionaries",{"_path":186,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":187,"description":188,"slug":189,"parentId":149,"order":190,"_type":15,"_id":191,"_source":17,"_file":192,"_stem":193,"_extension":20},"/python-how-to/handle-missing-keys","Handle Missing Keys","Learn safe ways to access dictionary keys and handle missing values","handle-missing-keys",20,"content:python-how-to:20.handle-missing-keys.md","python-how-to/20.handle-missing-keys.md","python-how-to/20.handle-missing-keys",{"_path":195,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":196,"description":197,"slug":198,"parentId":149,"order":199,"_type":15,"_id":200,"_source":17,"_file":201,"_stem":202,"_extension":20},"/python-how-to/dictionary-comprehensions","Use Dictionary Comprehensions","Learn how to create dictionaries efficiently using comprehensions","dictionary-comprehensions",21,"content:python-how-to:21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions",{"_path":204,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":205,"description":206,"slug":207,"parentId":149,"order":208,"_type":15,"_id":209,"_source":17,"_file":210,"_stem":211,"_extension":20},"/python-how-to/convert-lists-dictionaries","Convert Between Lists and Dictionaries","Learn how to transform data between lists and dictionaries in Python","convert-lists-dictionaries",22,"content:python-how-to:22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries",{"_path":213,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":214,"description":215,"slug":216,"order":217,"isParent":13,"icon":14,"_type":15,"_id":218,"_source":17,"_file":219,"_stem":220,"_extension":20,"children":221,"expanded":13},"/python-how-to/file-operations","File Operations","Learn essential file operations in Python for reading, writing, and managing files","file-operations",23,"content:python-how-to:23.file-operations.md","python-how-to/23.file-operations.md","python-how-to/23.file-operations",[222,231,240,249,258,267,276],{"_path":223,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":224,"description":225,"slug":226,"parentId":213,"order":227,"_type":15,"_id":228,"_source":17,"_file":229,"_stem":230,"_extension":20},"/python-how-to/read-text-files","Read Text Files","Learn how to read text files in Python using different methods","read-text-files",24,"content:python-how-to:24.read-text-files.md","python-how-to/24.read-text-files.md","python-how-to/24.read-text-files",{"_path":232,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":233,"description":234,"slug":235,"parentId":213,"order":236,"_type":15,"_id":237,"_source":17,"_file":238,"_stem":239,"_extension":20},"/python-how-to/write-to-files","Write to Files","Learn how to write and create files in Python using different methods","write-to-files",25,"content:python-how-to:25.write-to-files.md","python-how-to/25.write-to-files.md","python-how-to/25.write-to-files",{"_path":241,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":242,"description":243,"slug":244,"parentId":213,"order":245,"_type":15,"_id":246,"_source":17,"_file":247,"_stem":248,"_extension":20},"/python-how-to/work-csv-files","Work with CSV Files","Learn how to read and write CSV files in Python using the csv module","work-csv-files",26,"content:python-how-to:26.work-csv-files.md","python-how-to/26.work-csv-files.md","python-how-to/26.work-csv-files",{"_path":250,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":251,"description":252,"slug":253,"parentId":213,"order":254,"_type":15,"_id":255,"_source":17,"_file":256,"_stem":257,"_extension":20},"/python-how-to/handle-file-paths","Handle File Paths","Learn how to work with file and directory paths in Python using pathlib and os modules","handle-file-paths",27,"content:python-how-to:27.handle-file-paths.md","python-how-to/27.handle-file-paths.md","python-how-to/27.handle-file-paths",{"_path":259,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":260,"description":261,"slug":262,"parentId":213,"order":263,"_type":15,"_id":264,"_source":17,"_file":265,"_stem":266,"_extension":20},"/python-how-to/work-json-files","Work with JSON Files","Learn how to read and write JSON files in Python using the json module","work-json-files",28,"content:python-how-to:28.work-json-files.md","python-how-to/28.work-json-files.md","python-how-to/28.work-json-files",{"_path":268,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":269,"description":270,"slug":271,"parentId":213,"order":272,"_type":15,"_id":273,"_source":17,"_file":274,"_stem":275,"_extension":20},"/python-how-to/handle-binary-files","Handle Binary Files","Learn how to work with binary files in Python for images, data, and other non-text content","handle-binary-files",29,"content:python-how-to:29.handle-binary-files.md","python-how-to/29.handle-binary-files.md","python-how-to/29.handle-binary-files",{"_path":277,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":278,"description":279,"slug":280,"parentId":213,"order":281,"_type":15,"_id":282,"_source":17,"_file":283,"_stem":284,"_extension":20},"/python-how-to/use-context-managers","Use Context Managers","Learn how to use context managers for safe resource handling in Python","use-context-managers",30,"content:python-how-to:30.use-context-managers.md","python-how-to/30.use-context-managers.md","python-how-to/30.use-context-managers",{"_path":286,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":287,"description":288,"slug":289,"parentId":290,"order":291,"isParent":13,"icon":292,"_type":15,"_id":293,"_source":17,"_file":294,"_stem":295,"_extension":20,"children":296,"expanded":13},"/python-how-to/date-and-time","Date and Time","Master Python's date and time handling with datetime, time zones, formatting, and calculations","date-and-time","/python-how-to",31,"pi pi-calendar","content:python-how-to:31.date-and-time.md","python-how-to/31.date-and-time.md","python-how-to/31.date-and-time",[297,306,315,324,333,342],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":286,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python-how-to/get-current-datetime","Get Current Date/Time","Learn how to get current date, time, and timestamps using Python's datetime module","get-current-datetime",32,"content:python-how-to:32.get-current-datetime.md","python-how-to/32.get-current-datetime.md","python-how-to/32.get-current-datetime",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":286,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python-how-to/format-dates","Format Dates","Master date formatting with strftime, custom formats, and locale-aware formatting for user-friendly displays","format-dates",33,"content:python-how-to:33.format-dates.md","python-how-to/33.format-dates.md","python-how-to/33.format-dates",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":286,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python-how-to/calculate-date-differences","Calculate Date Differences","Learn to calculate time differences, durations, and intervals using Python's timedelta for scheduling and analytics","calculate-date-differences",34,"content:python-how-to:34.calculate-date-differences.md","python-how-to/34.calculate-date-differences.md","python-how-to/34.calculate-date-differences",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":286,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python-how-to/parse-date-strings","Parse Date Strings","Convert text dates into Python datetime objects using strptime, handle multiple formats, and validate date input","parse-date-strings",35,"content:python-how-to:35.parse-date-strings.md","python-how-to/35.parse-date-strings.md","python-how-to/35.parse-date-strings",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":286,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python-how-to/handle-timezones","Handle Timezones","Master timezone handling with zoneinfo, UTC conversions, and timezone-aware datetime objects for global applications","handle-timezones",36,"content:python-how-to:36.handle-timezones.md","python-how-to/36.handle-timezones.md","python-how-to/36.handle-timezones",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":286,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python-how-to/work-with-timestamps","Work with Timestamps","Master Unix timestamps in Python - convert between datetime objects and timestamps for APIs, databases, and system integration","work-with-timestamps",37,"content:python-how-to:37.work-with-timestamps.md","python-how-to/37.work-with-timestamps.md","python-how-to/37.work-with-timestamps",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":290,"order":356,"isParent":13,"icon":357,"_type":15,"_id":358,"_source":17,"_file":359,"_stem":360,"_extension":20,"children":361,"expanded":13},"/python-how-to/error-handling","Error Handling","Learn Python's error handling with try/except, custom exceptions, debugging, logging, and retry logic for robust applications","error-handling",38,"pi pi-exclamation-triangle","content:python-how-to:38.error-handling.md","python-how-to/38.error-handling.md","python-how-to/38.error-handling",[362,371,380,389,398],{"_path":363,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":364,"description":365,"slug":366,"parentId":352,"order":367,"_type":15,"_id":368,"_source":17,"_file":369,"_stem":370,"_extension":20},"/python-how-to/handle-exceptions","Handle Exceptions","Master try/except blocks, multiple exception handling, and finally clauses for robust error handling in Python","handle-exceptions",39,"content:python-how-to:39.handle-exceptions.md","python-how-to/39.handle-exceptions.md","python-how-to/39.handle-exceptions",{"_path":372,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":373,"description":374,"slug":375,"parentId":352,"order":376,"_type":15,"_id":377,"_source":17,"_file":378,"_stem":379,"_extension":20},"/python-how-to/create-custom-exceptions","Create Custom Exceptions","Learn to create custom exception classes in Python for specific error handling and better code organization","create-custom-exceptions",40,"content:python-how-to:40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions",{"_path":381,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":382,"description":383,"slug":384,"parentId":352,"order":385,"_type":15,"_id":386,"_source":17,"_file":387,"_stem":388,"_extension":20},"/python-how-to/debug-code","Debug Code","Learn Python debugging techniques using print statements, the debugger, and tools to find and fix code issues","debug-code",41,"content:python-how-to:41.debug-code.md","python-how-to/41.debug-code.md","python-how-to/41.debug-code",{"_path":390,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":391,"description":392,"slug":393,"parentId":352,"order":394,"_type":15,"_id":395,"_source":17,"_file":396,"_stem":397,"_extension":20},"/python-how-to/use-logging","Use Logging","Learn Python's logging module for tracking application behavior, errors, and debugging information","use-logging",42,"content:python-how-to:42.use-logging.md","python-how-to/42.use-logging.md","python-how-to/42.use-logging",{"_path":399,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":400,"description":401,"slug":402,"parentId":352,"order":403,"_type":15,"_id":404,"_source":17,"_file":405,"_stem":406,"_extension":20},"/python-how-to/implement-retry-logic","Implement Retry Logic","Learn to implement retry mechanisms in Python for handling temporary failures and building resilient applications","implement-retry-logic",43,"content:python-how-to:43.implement-retry-logic.md","python-how-to/43.implement-retry-logic.md","python-how-to/43.implement-retry-logic",{"_path":408,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":409,"description":410,"slug":411,"parentId":290,"order":412,"isParent":13,"icon":413,"_type":15,"_id":414,"_source":17,"_file":415,"_stem":416,"_extension":20,"children":417,"expanded":13},"/python-how-to/functions-and-modules","Functions and Modules","Learn Python functions, modules, and code organization for building reusable, maintainable applications","functions-and-modules",44,"pi pi-box","content:python-how-to:44.functions-and-modules.md","python-how-to/44.functions-and-modules.md","python-how-to/44.functions-and-modules",[418,427,436,445,454,463],{"_path":419,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":420,"description":421,"slug":422,"parentId":408,"order":423,"_type":15,"_id":424,"_source":17,"_file":425,"_stem":426,"_extension":20},"/python-how-to/write-functions","Write Functions","Learn to create Python functions with parameters, return values, and documentation for reusable code","write-functions",45,"content:python-how-to:45.write-functions.md","python-how-to/45.write-functions.md","python-how-to/45.write-functions",{"_path":428,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":429,"description":430,"slug":431,"parentId":408,"order":432,"_type":15,"_id":433,"_source":17,"_file":434,"_stem":435,"_extension":20},"/python-how-to/use-args-kwargs","Use *args and **kwargs","Learn to use *args and **kwargs for flexible function arguments in Python","use-args-kwargs",46,"content:python-how-to:46.use-args-kwargs.md","python-how-to/46.use-args-kwargs.md","python-how-to/46.use-args-kwargs",{"_path":437,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":438,"description":439,"slug":440,"parentId":408,"order":441,"_type":15,"_id":442,"_source":17,"_file":443,"_stem":444,"_extension":20},"/python-how-to/create-decorators","Create Decorators","Learn to create and use Python decorators to enhance function behavior and add functionality","create-decorators",47,"content:python-how-to:47.create-decorators.md","python-how-to/47.create-decorators.md","python-how-to/47.create-decorators",{"_path":446,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":447,"description":448,"slug":449,"parentId":408,"order":450,"_type":15,"_id":451,"_source":17,"_file":452,"_stem":453,"_extension":20},"/python-how-to/use-generators","Use Generators","Learn to create memory-efficient generators with yield for processing large datasets and sequences","use-generators",48,"content:python-how-to:48.use-generators.md","python-how-to/48.use-generators.md","python-how-to/48.use-generators",{"_path":455,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":456,"description":457,"slug":458,"parentId":408,"order":459,"_type":15,"_id":460,"_source":17,"_file":461,"_stem":462,"_extension":20},"/python-how-to/work-modules-packages","Work with Modules and Packages","Learn to organize Python code with modules and packages, and use imports effectively","work-modules-packages",49,"content:python-how-to:49.work-modules-packages.md","python-how-to/49.work-modules-packages.md","python-how-to/49.work-modules-packages",{"_path":464,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":465,"description":466,"slug":467,"parentId":408,"order":468,"_type":15,"_id":469,"_source":17,"_file":470,"_stem":471,"_extension":20},"/python-how-to/create-virtual-environments","Create Virtual Environments","Learn to create and manage Python virtual environments for project dependency isolation","create-virtual-environments",50,"content:python-how-to:50.create-virtual-environments.md","python-how-to/50.create-virtual-environments.md","python-how-to/50.create-virtual-environments",{"_path":473,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":474,"description":475,"slug":476,"parentId":290,"order":477,"isParent":13,"icon":478,"_type":15,"_id":479,"_source":17,"_file":480,"_stem":481,"_extension":20,"children":482,"expanded":13},"/python-how-to/data-processing","Data Processing","Learn Python data processing techniques including regex, APIs, databases, and large file handling","data-processing",51,"pi pi-database","content:python-how-to:51.data-processing.md","python-how-to/51.data-processing.md","python-how-to/51.data-processing",[483,492,501,510,519],{"_path":484,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":485,"description":486,"slug":487,"parentId":473,"order":488,"_type":15,"_id":489,"_source":17,"_file":490,"_stem":491,"_extension":20},"/python-how-to/work-regular-expressions","Work with Regular Expressions","Learn to use Python's re module for pattern matching, text extraction, and data validation","work-regular-expressions",52,"content:python-how-to:52.work-regular-expressions.md","python-how-to/52.work-regular-expressions.md","python-how-to/52.work-regular-expressions",{"_path":493,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":494,"description":495,"slug":496,"parentId":473,"order":497,"_type":15,"_id":498,"_source":17,"_file":499,"_stem":500,"_extension":20},"/python-how-to/parse-xml-html","Parse XML and HTML","Learn to extract data from XML and HTML documents using Python's built-in parsing tools","parse-xml-html",53,"content:python-how-to:53.parse-xml-html.md","python-how-to/53.parse-xml-html.md","python-how-to/53.parse-xml-html",{"_path":502,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":503,"description":504,"slug":505,"parentId":473,"order":506,"_type":15,"_id":507,"_source":17,"_file":508,"_stem":509,"_extension":20},"/python-how-to/handle-api-requests","Handle API Requests","Learn to fetch and process data from web APIs using Python's urllib and external requests library","handle-api-requests",54,"content:python-how-to:54.handle-api-requests.md","python-how-to/54.handle-api-requests.md","python-how-to/54.handle-api-requests",{"_path":511,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":512,"description":513,"slug":514,"parentId":473,"order":515,"_type":15,"_id":516,"_source":17,"_file":517,"_stem":518,"_extension":20},"/python-how-to/work-databases","Work with Databases","Learn to connect to and query SQL databases using Python's sqlite3 and database techniques","work-databases",55,"content:python-how-to:55.work-databases.md","python-how-to/55.work-databases.md","python-how-to/55.work-databases",{"_path":520,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":521,"description":522,"slug":523,"parentId":473,"order":524,"_type":15,"_id":525,"_source":17,"_file":526,"_stem":527,"_extension":20},"/python-how-to/process-large-files","Process Large Files","Learn memory-efficient techniques for handling large files and datasets in Python","process-large-files",56,"content:python-how-to:56.process-large-files.md","python-how-to/56.process-large-files.md","python-how-to/56.process-large-files",{"_path":529,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":530,"description":531,"slug":532,"parentId":290,"order":533,"isParent":13,"icon":534,"_type":15,"_id":535,"_source":17,"_file":536,"_stem":537,"_extension":20,"children":538},"/python-how-to/best-practices","Best Practices","Learn Python best practices for writing clean, maintainable, and efficient code","best-practices",57,"pi pi-star","content:python-how-to:57.best-practices.md","python-how-to/57.best-practices.md","python-how-to/57.best-practices",[539,548,557,566,575,584],{"_path":540,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":541,"description":542,"slug":543,"parentId":529,"order":544,"_type":15,"_id":545,"_source":17,"_file":546,"_stem":547,"_extension":20},"/python-how-to/structure-code","Structure Your Code","Learn to organize Python code with proper module structure, functions, and classes","structure-code",58,"content:python-how-to:58.structure-code.md","python-how-to/58.structure-code.md","python-how-to/58.structure-code",{"_path":549,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":550,"description":551,"slug":552,"parentId":529,"order":553,"_type":15,"_id":554,"_source":17,"_file":555,"_stem":556,"_extension":20},"/python-how-to/write-clean-code","Write Clean Code","Learn to write readable, maintainable Python code with proper naming, comments, and clear logic","write-clean-code",59,"content:python-how-to:59.write-clean-code.md","python-how-to/59.write-clean-code.md","python-how-to/59.write-clean-code",{"_path":558,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":559,"description":560,"slug":561,"parentId":529,"order":562,"_type":15,"_id":563,"_source":17,"_file":564,"_stem":565,"_extension":20},"/python-how-to/optimize-performance","Optimize Performance","Learn to identify and fix performance bottlenecks in Python code for faster execution","optimize-performance",60,"content:python-how-to:60.optimize-performance.md","python-how-to/60.optimize-performance.md","python-how-to/60.optimize-performance",{"_path":567,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":568,"description":569,"slug":570,"parentId":529,"order":571,"_type":15,"_id":572,"_source":17,"_file":573,"_stem":574,"_extension":20},"/python-how-to/write-unit-tests","Write Unit Tests","Learn to create reliable unit tests to verify your Python code works correctly and catch bugs early","write-unit-tests",61,"content:python-how-to:61.write-unit-tests.md","python-how-to/61.write-unit-tests.md","python-how-to/61.write-unit-tests",{"_path":576,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":577,"description":578,"slug":579,"parentId":529,"order":580,"_type":15,"_id":581,"_source":17,"_file":582,"_stem":583,"_extension":20},"/python-how-to/document-code","Document Your Code","Learn to write clear documentation and helpful comments for your Python code","document-code",62,"content:python-how-to:62.document-code.md","python-how-to/62.document-code.md","python-how-to/62.document-code",{"_path":585,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":586,"description":587,"slug":588,"parentId":529,"order":589,"_type":15,"_id":590,"_source":17,"_file":591,"_stem":592,"_extension":20},"/python-how-to/use-type-hints","Use Type Hints","Learn to add type annotations to Python code for better clarity, tooling support, and error detection","use-type-hints",63,"content:python-how-to:63.use-type-hints.md","python-how-to/63.use-type-hints.md","python-how-to/63.use-type-hints",{"_path":290,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":594,"description":595,"slug":6,"order":596,"icon":14,"_type":15,"_id":597,"_source":17,"_file":598,"_stem":599,"_extension":20,"expanded":13},"Python How-To Guide","Practical Python tutorials for common programming tasks. Learn step-by-step solutions for string manipulation, file operations, data processing, and more with real-world examples.",0,"content:python-how-to:index.md","python-how-to/index.md","python-how-to/index",[510],{"_path":511,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":512,"description":513,"slug":514,"parentId":473,"order":515,"body":602,"_type":15,"_id":516,"_source":17,"_file":517,"_stem":518,"_extension":20},{"type":603,"children":604,"toc":6974},"root",[605,614,620,1172,1179,1184,1341,1348,2118,2124,3204,3210,3417,3423,3429,5120,5126,6807,6813,6943,6949,6954,6968],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"working-with-databases",[611],{"type":612,"value":613},"text","💾 Working with Databases",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618],{"type":612,"value":619},"Databases store and organize data for efficient retrieval and manipulation. Python provides built-in support for SQLite databases and can connect to other database systems like PostgreSQL, MySQL, and more.",{"type":606,"tag":621,"props":622,"children":623},"code-try",{},[624],{"type":606,"tag":625,"props":626,"children":630},"pre",{"className":627,"code":628,"language":629,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","import sqlite3\n\n# Create in-memory database for demo\nconn = sqlite3.connect(':memory:')\ncursor = conn.cursor()\n\n# Create a table\ncursor.execute('''\n    CREATE TABLE users (\n        id INTEGER PRIMARY KEY,\n        name TEXT NOT NULL,\n        email TEXT UNIQUE,\n        age INTEGER\n    )\n''')\n\n# Insert some data\nusers_data = [\n    ('Alice Johnson', 'alice@example.com', 30),\n    ('Bob Smith', 'bob@example.com', 25),\n    ('Charlie Brown', 'charlie@example.com', 35)\n]\n\ncursor.executemany('INSERT INTO users (name, email, age) VALUES (?, ?, ?)', users_data)\n\n# Query the data\ncursor.execute('SELECT * FROM users WHERE age > 25')\nresults = cursor.fetchall()\n\nprint(\"Users older than 25:\")\nfor user in results:\n    print(f\"  {user[1]} ({user[3]} years old)\")\n\nconn.close()\n","python",[631],{"type":606,"tag":632,"props":633,"children":634},"code",{"__ignoreMap":8},[635,652,660,669,698,715,722,730,743,752,760,768,776,784,792,804,811,819,836,874,908,942,950,957,975,982,990,1006,1023,1030,1052,1075,1157,1164],{"type":606,"tag":636,"props":637,"children":639},"span",{"class":638,"line":12},"line",[640,646],{"type":606,"tag":636,"props":641,"children":643},{"style":642},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[644],{"type":612,"value":645},"import",{"type":606,"tag":636,"props":647,"children":649},{"style":648},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[650],{"type":612,"value":651}," sqlite3\n",{"type":606,"tag":636,"props":653,"children":654},{"class":638,"line":27},[655],{"type":606,"tag":636,"props":656,"children":657},{"emptyLinePlaceholder":13},[658],{"type":612,"value":659},"\n",{"type":606,"tag":636,"props":661,"children":662},{"class":638,"line":36},[663],{"type":606,"tag":636,"props":664,"children":666},{"style":665},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[667],{"type":612,"value":668},"# Create in-memory database for demo\n",{"type":606,"tag":636,"props":670,"children":671},{"class":638,"line":45},[672,677,682,687,693],{"type":606,"tag":636,"props":673,"children":674},{"style":648},[675],{"type":612,"value":676},"conn ",{"type":606,"tag":636,"props":678,"children":679},{"style":642},[680],{"type":612,"value":681},"=",{"type":606,"tag":636,"props":683,"children":684},{"style":648},[685],{"type":612,"value":686}," sqlite3.connect(",{"type":606,"tag":636,"props":688,"children":690},{"style":689},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[691],{"type":612,"value":692},"':memory:'",{"type":606,"tag":636,"props":694,"children":695},{"style":648},[696],{"type":612,"value":697},")\n",{"type":606,"tag":636,"props":699,"children":700},{"class":638,"line":54},[701,706,710],{"type":606,"tag":636,"props":702,"children":703},{"style":648},[704],{"type":612,"value":705},"cursor ",{"type":606,"tag":636,"props":707,"children":708},{"style":642},[709],{"type":612,"value":681},{"type":606,"tag":636,"props":711,"children":712},{"style":648},[713],{"type":612,"value":714}," conn.cursor()\n",{"type":606,"tag":636,"props":716,"children":717},{"class":638,"line":63},[718],{"type":606,"tag":636,"props":719,"children":720},{"emptyLinePlaceholder":13},[721],{"type":612,"value":659},{"type":606,"tag":636,"props":723,"children":724},{"class":638,"line":72},[725],{"type":606,"tag":636,"props":726,"children":727},{"style":665},[728],{"type":612,"value":729},"# Create a table\n",{"type":606,"tag":636,"props":731,"children":732},{"class":638,"line":81},[733,738],{"type":606,"tag":636,"props":734,"children":735},{"style":648},[736],{"type":612,"value":737},"cursor.execute(",{"type":606,"tag":636,"props":739,"children":740},{"style":689},[741],{"type":612,"value":742},"'''\n",{"type":606,"tag":636,"props":744,"children":746},{"class":638,"line":745},9,[747],{"type":606,"tag":636,"props":748,"children":749},{"style":689},[750],{"type":612,"value":751},"    CREATE TABLE users (\n",{"type":606,"tag":636,"props":753,"children":754},{"class":638,"line":99},[755],{"type":606,"tag":636,"props":756,"children":757},{"style":689},[758],{"type":612,"value":759},"        id INTEGER PRIMARY KEY,\n",{"type":606,"tag":636,"props":761,"children":762},{"class":638,"line":108},[763],{"type":606,"tag":636,"props":764,"children":765},{"style":689},[766],{"type":612,"value":767},"        name TEXT NOT NULL,\n",{"type":606,"tag":636,"props":769,"children":770},{"class":638,"line":117},[771],{"type":606,"tag":636,"props":772,"children":773},{"style":689},[774],{"type":612,"value":775},"        email TEXT UNIQUE,\n",{"type":606,"tag":636,"props":777,"children":778},{"class":638,"line":126},[779],{"type":606,"tag":636,"props":780,"children":781},{"style":689},[782],{"type":612,"value":783},"        age INTEGER\n",{"type":606,"tag":636,"props":785,"children":786},{"class":638,"line":135},[787],{"type":606,"tag":636,"props":788,"children":789},{"style":689},[790],{"type":612,"value":791},"    )\n",{"type":606,"tag":636,"props":793,"children":794},{"class":638,"line":144},[795,800],{"type":606,"tag":636,"props":796,"children":797},{"style":689},[798],{"type":612,"value":799},"'''",{"type":606,"tag":636,"props":801,"children":802},{"style":648},[803],{"type":612,"value":697},{"type":606,"tag":636,"props":805,"children":806},{"class":638,"line":153},[807],{"type":606,"tag":636,"props":808,"children":809},{"emptyLinePlaceholder":13},[810],{"type":612,"value":659},{"type":606,"tag":636,"props":812,"children":813},{"class":638,"line":163},[814],{"type":606,"tag":636,"props":815,"children":816},{"style":665},[817],{"type":612,"value":818},"# Insert some data\n",{"type":606,"tag":636,"props":820,"children":821},{"class":638,"line":172},[822,827,831],{"type":606,"tag":636,"props":823,"children":824},{"style":648},[825],{"type":612,"value":826},"users_data ",{"type":606,"tag":636,"props":828,"children":829},{"style":642},[830],{"type":612,"value":681},{"type":606,"tag":636,"props":832,"children":833},{"style":648},[834],{"type":612,"value":835}," [\n",{"type":606,"tag":636,"props":837,"children":838},{"class":638,"line":181},[839,844,849,854,859,863,869],{"type":606,"tag":636,"props":840,"children":841},{"style":648},[842],{"type":612,"value":843},"    (",{"type":606,"tag":636,"props":845,"children":846},{"style":689},[847],{"type":612,"value":848},"'Alice Johnson'",{"type":606,"tag":636,"props":850,"children":851},{"style":648},[852],{"type":612,"value":853},", ",{"type":606,"tag":636,"props":855,"children":856},{"style":689},[857],{"type":612,"value":858},"'alice@example.com'",{"type":606,"tag":636,"props":860,"children":861},{"style":648},[862],{"type":612,"value":853},{"type":606,"tag":636,"props":864,"children":866},{"style":865},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[867],{"type":612,"value":868},"30",{"type":606,"tag":636,"props":870,"children":871},{"style":648},[872],{"type":612,"value":873},"),\n",{"type":606,"tag":636,"props":875,"children":876},{"class":638,"line":190},[877,881,886,890,895,899,904],{"type":606,"tag":636,"props":878,"children":879},{"style":648},[880],{"type":612,"value":843},{"type":606,"tag":636,"props":882,"children":883},{"style":689},[884],{"type":612,"value":885},"'Bob Smith'",{"type":606,"tag":636,"props":887,"children":888},{"style":648},[889],{"type":612,"value":853},{"type":606,"tag":636,"props":891,"children":892},{"style":689},[893],{"type":612,"value":894},"'bob@example.com'",{"type":606,"tag":636,"props":896,"children":897},{"style":648},[898],{"type":612,"value":853},{"type":606,"tag":636,"props":900,"children":901},{"style":865},[902],{"type":612,"value":903},"25",{"type":606,"tag":636,"props":905,"children":906},{"style":648},[907],{"type":612,"value":873},{"type":606,"tag":636,"props":909,"children":910},{"class":638,"line":199},[911,915,920,924,929,933,938],{"type":606,"tag":636,"props":912,"children":913},{"style":648},[914],{"type":612,"value":843},{"type":606,"tag":636,"props":916,"children":917},{"style":689},[918],{"type":612,"value":919},"'Charlie Brown'",{"type":606,"tag":636,"props":921,"children":922},{"style":648},[923],{"type":612,"value":853},{"type":606,"tag":636,"props":925,"children":926},{"style":689},[927],{"type":612,"value":928},"'charlie@example.com'",{"type":606,"tag":636,"props":930,"children":931},{"style":648},[932],{"type":612,"value":853},{"type":606,"tag":636,"props":934,"children":935},{"style":865},[936],{"type":612,"value":937},"35",{"type":606,"tag":636,"props":939,"children":940},{"style":648},[941],{"type":612,"value":697},{"type":606,"tag":636,"props":943,"children":944},{"class":638,"line":208},[945],{"type":606,"tag":636,"props":946,"children":947},{"style":648},[948],{"type":612,"value":949},"]\n",{"type":606,"tag":636,"props":951,"children":952},{"class":638,"line":217},[953],{"type":606,"tag":636,"props":954,"children":955},{"emptyLinePlaceholder":13},[956],{"type":612,"value":659},{"type":606,"tag":636,"props":958,"children":959},{"class":638,"line":227},[960,965,970],{"type":606,"tag":636,"props":961,"children":962},{"style":648},[963],{"type":612,"value":964},"cursor.executemany(",{"type":606,"tag":636,"props":966,"children":967},{"style":689},[968],{"type":612,"value":969},"'INSERT INTO users (name, email, age) VALUES (?, ?, ?)'",{"type":606,"tag":636,"props":971,"children":972},{"style":648},[973],{"type":612,"value":974},", users_data)\n",{"type":606,"tag":636,"props":976,"children":977},{"class":638,"line":236},[978],{"type":606,"tag":636,"props":979,"children":980},{"emptyLinePlaceholder":13},[981],{"type":612,"value":659},{"type":606,"tag":636,"props":983,"children":984},{"class":638,"line":245},[985],{"type":606,"tag":636,"props":986,"children":987},{"style":665},[988],{"type":612,"value":989},"# Query the data\n",{"type":606,"tag":636,"props":991,"children":992},{"class":638,"line":254},[993,997,1002],{"type":606,"tag":636,"props":994,"children":995},{"style":648},[996],{"type":612,"value":737},{"type":606,"tag":636,"props":998,"children":999},{"style":689},[1000],{"type":612,"value":1001},"'SELECT * FROM users WHERE age > 25'",{"type":606,"tag":636,"props":1003,"children":1004},{"style":648},[1005],{"type":612,"value":697},{"type":606,"tag":636,"props":1007,"children":1008},{"class":638,"line":263},[1009,1014,1018],{"type":606,"tag":636,"props":1010,"children":1011},{"style":648},[1012],{"type":612,"value":1013},"results ",{"type":606,"tag":636,"props":1015,"children":1016},{"style":642},[1017],{"type":612,"value":681},{"type":606,"tag":636,"props":1019,"children":1020},{"style":648},[1021],{"type":612,"value":1022}," cursor.fetchall()\n",{"type":606,"tag":636,"props":1024,"children":1025},{"class":638,"line":272},[1026],{"type":606,"tag":636,"props":1027,"children":1028},{"emptyLinePlaceholder":13},[1029],{"type":612,"value":659},{"type":606,"tag":636,"props":1031,"children":1032},{"class":638,"line":281},[1033,1038,1043,1048],{"type":606,"tag":636,"props":1034,"children":1035},{"style":865},[1036],{"type":612,"value":1037},"print",{"type":606,"tag":636,"props":1039,"children":1040},{"style":648},[1041],{"type":612,"value":1042},"(",{"type":606,"tag":636,"props":1044,"children":1045},{"style":689},[1046],{"type":612,"value":1047},"\"Users older than 25:\"",{"type":606,"tag":636,"props":1049,"children":1050},{"style":648},[1051],{"type":612,"value":697},{"type":606,"tag":636,"props":1053,"children":1054},{"class":638,"line":291},[1055,1060,1065,1070],{"type":606,"tag":636,"props":1056,"children":1057},{"style":642},[1058],{"type":612,"value":1059},"for",{"type":606,"tag":636,"props":1061,"children":1062},{"style":648},[1063],{"type":612,"value":1064}," user ",{"type":606,"tag":636,"props":1066,"children":1067},{"style":642},[1068],{"type":612,"value":1069},"in",{"type":606,"tag":636,"props":1071,"children":1072},{"style":648},[1073],{"type":612,"value":1074}," results:\n",{"type":606,"tag":636,"props":1076,"children":1077},{"class":638,"line":302},[1078,1083,1087,1092,1097,1102,1107,1112,1117,1122,1127,1131,1135,1140,1144,1148,1153],{"type":606,"tag":636,"props":1079,"children":1080},{"style":865},[1081],{"type":612,"value":1082},"    print",{"type":606,"tag":636,"props":1084,"children":1085},{"style":648},[1086],{"type":612,"value":1042},{"type":606,"tag":636,"props":1088,"children":1089},{"style":642},[1090],{"type":612,"value":1091},"f",{"type":606,"tag":636,"props":1093,"children":1094},{"style":689},[1095],{"type":612,"value":1096},"\"  ",{"type":606,"tag":636,"props":1098,"children":1099},{"style":865},[1100],{"type":612,"value":1101},"{",{"type":606,"tag":636,"props":1103,"children":1104},{"style":648},[1105],{"type":612,"value":1106},"user[",{"type":606,"tag":636,"props":1108,"children":1109},{"style":865},[1110],{"type":612,"value":1111},"1",{"type":606,"tag":636,"props":1113,"children":1114},{"style":648},[1115],{"type":612,"value":1116},"]",{"type":606,"tag":636,"props":1118,"children":1119},{"style":865},[1120],{"type":612,"value":1121},"}",{"type":606,"tag":636,"props":1123,"children":1124},{"style":689},[1125],{"type":612,"value":1126}," (",{"type":606,"tag":636,"props":1128,"children":1129},{"style":865},[1130],{"type":612,"value":1101},{"type":606,"tag":636,"props":1132,"children":1133},{"style":648},[1134],{"type":612,"value":1106},{"type":606,"tag":636,"props":1136,"children":1137},{"style":865},[1138],{"type":612,"value":1139},"3",{"type":606,"tag":636,"props":1141,"children":1142},{"style":648},[1143],{"type":612,"value":1116},{"type":606,"tag":636,"props":1145,"children":1146},{"style":865},[1147],{"type":612,"value":1121},{"type":606,"tag":636,"props":1149,"children":1150},{"style":689},[1151],{"type":612,"value":1152}," years old)\"",{"type":606,"tag":636,"props":1154,"children":1155},{"style":648},[1156],{"type":612,"value":697},{"type":606,"tag":636,"props":1158,"children":1159},{"class":638,"line":311},[1160],{"type":606,"tag":636,"props":1161,"children":1162},{"emptyLinePlaceholder":13},[1163],{"type":612,"value":659},{"type":606,"tag":636,"props":1165,"children":1166},{"class":638,"line":320},[1167],{"type":606,"tag":636,"props":1168,"children":1169},{"style":648},[1170],{"type":612,"value":1171},"conn.close()\n",{"type":606,"tag":1173,"props":1174,"children":1176},"h2",{"id":1175},"understanding-database-operations",[1177],{"type":612,"value":1178},"🎯 Understanding Database Operations",{"type":606,"tag":615,"props":1180,"children":1181},{},[1182],{"type":612,"value":1183},"Databases use SQL (Structured Query Language) for creating, reading, updating, and deleting data.",{"type":606,"tag":1185,"props":1186,"children":1190},"info-box",{"emoji":1187,"title":1188,"type":1189},"🗄️","Database Basics","info",[1191,1200,1245,1253,1276,1284],{"type":606,"tag":615,"props":1192,"children":1193},{},[1194],{"type":606,"tag":1195,"props":1196,"children":1197},"strong",{},[1198],{"type":612,"value":1199},"CRUD Operations:",{"type":606,"tag":1201,"props":1202,"children":1203},"ul",{},[1204,1215,1225,1235],{"type":606,"tag":1205,"props":1206,"children":1207},"li",{},[1208,1213],{"type":606,"tag":1195,"props":1209,"children":1210},{},[1211],{"type":612,"value":1212},"Create",{"type":612,"value":1214}," - Insert new records",{"type":606,"tag":1205,"props":1216,"children":1217},{},[1218,1223],{"type":606,"tag":1195,"props":1219,"children":1220},{},[1221],{"type":612,"value":1222},"Read",{"type":612,"value":1224}," - Query and retrieve data",{"type":606,"tag":1205,"props":1226,"children":1227},{},[1228,1233],{"type":606,"tag":1195,"props":1229,"children":1230},{},[1231],{"type":612,"value":1232},"Update",{"type":612,"value":1234}," - Modify existing records",{"type":606,"tag":1205,"props":1236,"children":1237},{},[1238,1243],{"type":606,"tag":1195,"props":1239,"children":1240},{},[1241],{"type":612,"value":1242},"Delete",{"type":612,"value":1244}," - Remove records",{"type":606,"tag":615,"props":1246,"children":1247},{},[1248],{"type":606,"tag":1195,"props":1249,"children":1250},{},[1251],{"type":612,"value":1252},"SQLite Benefits:",{"type":606,"tag":1201,"props":1254,"children":1255},{},[1256,1261,1266,1271],{"type":606,"tag":1205,"props":1257,"children":1258},{},[1259],{"type":612,"value":1260},"No server setup required",{"type":606,"tag":1205,"props":1262,"children":1263},{},[1264],{"type":612,"value":1265},"File-based database",{"type":606,"tag":1205,"props":1267,"children":1268},{},[1269],{"type":612,"value":1270},"Built into Python",{"type":606,"tag":1205,"props":1272,"children":1273},{},[1274],{"type":612,"value":1275},"Good for development and small applications",{"type":606,"tag":615,"props":1277,"children":1278},{},[1279],{"type":606,"tag":1195,"props":1280,"children":1281},{},[1282],{"type":612,"value":1283},"SQL Commands:",{"type":606,"tag":1201,"props":1285,"children":1286},{},[1287,1298,1309,1320,1330],{"type":606,"tag":1205,"props":1288,"children":1289},{},[1290,1296],{"type":606,"tag":632,"props":1291,"children":1293},{"className":1292},[],[1294],{"type":612,"value":1295},"SELECT",{"type":612,"value":1297}," - Query data",{"type":606,"tag":1205,"props":1299,"children":1300},{},[1301,1307],{"type":606,"tag":632,"props":1302,"children":1304},{"className":1303},[],[1305],{"type":612,"value":1306},"INSERT",{"type":612,"value":1308}," - Add new records",{"type":606,"tag":1205,"props":1310,"children":1311},{},[1312,1318],{"type":606,"tag":632,"props":1313,"children":1315},{"className":1314},[],[1316],{"type":612,"value":1317},"UPDATE",{"type":612,"value":1319}," - Modify records",{"type":606,"tag":1205,"props":1321,"children":1322},{},[1323,1329],{"type":606,"tag":632,"props":1324,"children":1326},{"className":1325},[],[1327],{"type":612,"value":1328},"DELETE",{"type":612,"value":1244},{"type":606,"tag":1205,"props":1331,"children":1332},{},[1333,1339],{"type":606,"tag":632,"props":1334,"children":1336},{"className":1335},[],[1337],{"type":612,"value":1338},"CREATE TABLE",{"type":612,"value":1340}," - Define structure",{"type":606,"tag":1342,"props":1343,"children":1345},"h3",{"id":1344},"creating-and-managing-tables",[1346],{"type":612,"value":1347},"Creating and Managing Tables",{"type":606,"tag":621,"props":1349,"children":1350},{},[1351],{"type":606,"tag":625,"props":1352,"children":1354},{"className":627,"code":1353,"language":629,"meta":8,"style":8},"import sqlite3\n\ndef create_database():\n    \"\"\"Create database with multiple tables\"\"\"\n    conn = sqlite3.connect('example.db')\n    cursor = conn.cursor()\n    \n    # Create users table\n    cursor.execute('''\n        CREATE TABLE IF NOT EXISTS users (\n            id INTEGER PRIMARY KEY AUTOINCREMENT,\n            username TEXT UNIQUE NOT NULL,\n            email TEXT UNIQUE NOT NULL,\n            created_date TEXT DEFAULT CURRENT_TIMESTAMP\n        )\n    ''')\n    \n    # Create posts table\n    cursor.execute('''\n        CREATE TABLE IF NOT EXISTS posts (\n            id INTEGER PRIMARY KEY AUTOINCREMENT,\n            title TEXT NOT NULL,\n            content TEXT,\n            user_id INTEGER,\n            created_date TEXT DEFAULT CURRENT_TIMESTAMP,\n            FOREIGN KEY (user_id) REFERENCES users (id)\n        )\n    ''')\n    \n    conn.commit()\n    return conn\n\ndef add_sample_data(conn):\n    \"\"\"Add sample data to tables\"\"\"\n    cursor = conn.cursor()\n    \n    # Add users\n    users = [\n        ('alice123', 'alice@example.com'),\n        ('bob456', 'bob@example.com'),\n        ('charlie789', 'charlie@example.com')\n    ]\n    \n    cursor.executemany('INSERT OR IGNORE INTO users (username, email) VALUES (?, ?)', users)\n    \n    # Add posts\n    posts = [\n        ('My First Post', 'This is the content of my first post', 1),\n        ('Python Tips', 'Here are some useful Python tips', 1),\n        ('Database Tutorial', 'Learning about databases', 2),\n        ('Web Development', 'Building web applications', 3)\n    ]\n    \n    cursor.executemany('INSERT INTO posts (title, content, user_id) VALUES (?, ?, ?)', posts)\n    \n    conn.commit()\n    print(\"Sample data added successfully\")\n\n# Create database and add data\nconn = create_database()\nadd_sample_data(conn)\nconn.close()\n",[1355],{"type":606,"tag":632,"props":1356,"children":1357},{"__ignoreMap":8},[1358,1369,1376,1395,1403,1428,1444,1452,1460,1472,1480,1488,1496,1504,1512,1520,1532,1539,1547,1558,1566,1573,1581,1589,1597,1605,1613,1620,1631,1638,1646,1659,1666,1683,1691,1706,1713,1721,1737,1762,1786,1810,1818,1825,1843,1850,1858,1874,1907,1940,1974,2007,2014,2021,2038,2045,2052,2072,2079,2087,2103,2111],{"type":606,"tag":636,"props":1359,"children":1360},{"class":638,"line":12},[1361,1365],{"type":606,"tag":636,"props":1362,"children":1363},{"style":642},[1364],{"type":612,"value":645},{"type":606,"tag":636,"props":1366,"children":1367},{"style":648},[1368],{"type":612,"value":651},{"type":606,"tag":636,"props":1370,"children":1371},{"class":638,"line":27},[1372],{"type":606,"tag":636,"props":1373,"children":1374},{"emptyLinePlaceholder":13},[1375],{"type":612,"value":659},{"type":606,"tag":636,"props":1377,"children":1378},{"class":638,"line":36},[1379,1384,1390],{"type":606,"tag":636,"props":1380,"children":1381},{"style":642},[1382],{"type":612,"value":1383},"def",{"type":606,"tag":636,"props":1385,"children":1387},{"style":1386},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[1388],{"type":612,"value":1389}," create_database",{"type":606,"tag":636,"props":1391,"children":1392},{"style":648},[1393],{"type":612,"value":1394},"():\n",{"type":606,"tag":636,"props":1396,"children":1397},{"class":638,"line":45},[1398],{"type":606,"tag":636,"props":1399,"children":1400},{"style":689},[1401],{"type":612,"value":1402},"    \"\"\"Create database with multiple tables\"\"\"\n",{"type":606,"tag":636,"props":1404,"children":1405},{"class":638,"line":54},[1406,1411,1415,1419,1424],{"type":606,"tag":636,"props":1407,"children":1408},{"style":648},[1409],{"type":612,"value":1410},"    conn ",{"type":606,"tag":636,"props":1412,"children":1413},{"style":642},[1414],{"type":612,"value":681},{"type":606,"tag":636,"props":1416,"children":1417},{"style":648},[1418],{"type":612,"value":686},{"type":606,"tag":636,"props":1420,"children":1421},{"style":689},[1422],{"type":612,"value":1423},"'example.db'",{"type":606,"tag":636,"props":1425,"children":1426},{"style":648},[1427],{"type":612,"value":697},{"type":606,"tag":636,"props":1429,"children":1430},{"class":638,"line":63},[1431,1436,1440],{"type":606,"tag":636,"props":1432,"children":1433},{"style":648},[1434],{"type":612,"value":1435},"    cursor ",{"type":606,"tag":636,"props":1437,"children":1438},{"style":642},[1439],{"type":612,"value":681},{"type":606,"tag":636,"props":1441,"children":1442},{"style":648},[1443],{"type":612,"value":714},{"type":606,"tag":636,"props":1445,"children":1446},{"class":638,"line":72},[1447],{"type":606,"tag":636,"props":1448,"children":1449},{"style":648},[1450],{"type":612,"value":1451},"    \n",{"type":606,"tag":636,"props":1453,"children":1454},{"class":638,"line":81},[1455],{"type":606,"tag":636,"props":1456,"children":1457},{"style":665},[1458],{"type":612,"value":1459},"    # Create users table\n",{"type":606,"tag":636,"props":1461,"children":1462},{"class":638,"line":745},[1463,1468],{"type":606,"tag":636,"props":1464,"children":1465},{"style":648},[1466],{"type":612,"value":1467},"    cursor.execute(",{"type":606,"tag":636,"props":1469,"children":1470},{"style":689},[1471],{"type":612,"value":742},{"type":606,"tag":636,"props":1473,"children":1474},{"class":638,"line":99},[1475],{"type":606,"tag":636,"props":1476,"children":1477},{"style":689},[1478],{"type":612,"value":1479},"        CREATE TABLE IF NOT EXISTS users (\n",{"type":606,"tag":636,"props":1481,"children":1482},{"class":638,"line":108},[1483],{"type":606,"tag":636,"props":1484,"children":1485},{"style":689},[1486],{"type":612,"value":1487},"            id INTEGER PRIMARY KEY AUTOINCREMENT,\n",{"type":606,"tag":636,"props":1489,"children":1490},{"class":638,"line":117},[1491],{"type":606,"tag":636,"props":1492,"children":1493},{"style":689},[1494],{"type":612,"value":1495},"            username TEXT UNIQUE NOT NULL,\n",{"type":606,"tag":636,"props":1497,"children":1498},{"class":638,"line":126},[1499],{"type":606,"tag":636,"props":1500,"children":1501},{"style":689},[1502],{"type":612,"value":1503},"            email TEXT UNIQUE NOT NULL,\n",{"type":606,"tag":636,"props":1505,"children":1506},{"class":638,"line":135},[1507],{"type":606,"tag":636,"props":1508,"children":1509},{"style":689},[1510],{"type":612,"value":1511},"            created_date TEXT DEFAULT CURRENT_TIMESTAMP\n",{"type":606,"tag":636,"props":1513,"children":1514},{"class":638,"line":144},[1515],{"type":606,"tag":636,"props":1516,"children":1517},{"style":689},[1518],{"type":612,"value":1519},"        )\n",{"type":606,"tag":636,"props":1521,"children":1522},{"class":638,"line":153},[1523,1528],{"type":606,"tag":636,"props":1524,"children":1525},{"style":689},[1526],{"type":612,"value":1527},"    '''",{"type":606,"tag":636,"props":1529,"children":1530},{"style":648},[1531],{"type":612,"value":697},{"type":606,"tag":636,"props":1533,"children":1534},{"class":638,"line":163},[1535],{"type":606,"tag":636,"props":1536,"children":1537},{"style":648},[1538],{"type":612,"value":1451},{"type":606,"tag":636,"props":1540,"children":1541},{"class":638,"line":172},[1542],{"type":606,"tag":636,"props":1543,"children":1544},{"style":665},[1545],{"type":612,"value":1546},"    # Create posts table\n",{"type":606,"tag":636,"props":1548,"children":1549},{"class":638,"line":181},[1550,1554],{"type":606,"tag":636,"props":1551,"children":1552},{"style":648},[1553],{"type":612,"value":1467},{"type":606,"tag":636,"props":1555,"children":1556},{"style":689},[1557],{"type":612,"value":742},{"type":606,"tag":636,"props":1559,"children":1560},{"class":638,"line":190},[1561],{"type":606,"tag":636,"props":1562,"children":1563},{"style":689},[1564],{"type":612,"value":1565},"        CREATE TABLE IF NOT EXISTS posts (\n",{"type":606,"tag":636,"props":1567,"children":1568},{"class":638,"line":199},[1569],{"type":606,"tag":636,"props":1570,"children":1571},{"style":689},[1572],{"type":612,"value":1487},{"type":606,"tag":636,"props":1574,"children":1575},{"class":638,"line":208},[1576],{"type":606,"tag":636,"props":1577,"children":1578},{"style":689},[1579],{"type":612,"value":1580},"            title TEXT NOT NULL,\n",{"type":606,"tag":636,"props":1582,"children":1583},{"class":638,"line":217},[1584],{"type":606,"tag":636,"props":1585,"children":1586},{"style":689},[1587],{"type":612,"value":1588},"            content TEXT,\n",{"type":606,"tag":636,"props":1590,"children":1591},{"class":638,"line":227},[1592],{"type":606,"tag":636,"props":1593,"children":1594},{"style":689},[1595],{"type":612,"value":1596},"            user_id INTEGER,\n",{"type":606,"tag":636,"props":1598,"children":1599},{"class":638,"line":236},[1600],{"type":606,"tag":636,"props":1601,"children":1602},{"style":689},[1603],{"type":612,"value":1604},"            created_date TEXT DEFAULT CURRENT_TIMESTAMP,\n",{"type":606,"tag":636,"props":1606,"children":1607},{"class":638,"line":245},[1608],{"type":606,"tag":636,"props":1609,"children":1610},{"style":689},[1611],{"type":612,"value":1612},"            FOREIGN KEY (user_id) REFERENCES users (id)\n",{"type":606,"tag":636,"props":1614,"children":1615},{"class":638,"line":254},[1616],{"type":606,"tag":636,"props":1617,"children":1618},{"style":689},[1619],{"type":612,"value":1519},{"type":606,"tag":636,"props":1621,"children":1622},{"class":638,"line":263},[1623,1627],{"type":606,"tag":636,"props":1624,"children":1625},{"style":689},[1626],{"type":612,"value":1527},{"type":606,"tag":636,"props":1628,"children":1629},{"style":648},[1630],{"type":612,"value":697},{"type":606,"tag":636,"props":1632,"children":1633},{"class":638,"line":272},[1634],{"type":606,"tag":636,"props":1635,"children":1636},{"style":648},[1637],{"type":612,"value":1451},{"type":606,"tag":636,"props":1639,"children":1640},{"class":638,"line":281},[1641],{"type":606,"tag":636,"props":1642,"children":1643},{"style":648},[1644],{"type":612,"value":1645},"    conn.commit()\n",{"type":606,"tag":636,"props":1647,"children":1648},{"class":638,"line":291},[1649,1654],{"type":606,"tag":636,"props":1650,"children":1651},{"style":642},[1652],{"type":612,"value":1653},"    return",{"type":606,"tag":636,"props":1655,"children":1656},{"style":648},[1657],{"type":612,"value":1658}," conn\n",{"type":606,"tag":636,"props":1660,"children":1661},{"class":638,"line":302},[1662],{"type":606,"tag":636,"props":1663,"children":1664},{"emptyLinePlaceholder":13},[1665],{"type":612,"value":659},{"type":606,"tag":636,"props":1667,"children":1668},{"class":638,"line":311},[1669,1673,1678],{"type":606,"tag":636,"props":1670,"children":1671},{"style":642},[1672],{"type":612,"value":1383},{"type":606,"tag":636,"props":1674,"children":1675},{"style":1386},[1676],{"type":612,"value":1677}," add_sample_data",{"type":606,"tag":636,"props":1679,"children":1680},{"style":648},[1681],{"type":612,"value":1682},"(conn):\n",{"type":606,"tag":636,"props":1684,"children":1685},{"class":638,"line":320},[1686],{"type":606,"tag":636,"props":1687,"children":1688},{"style":689},[1689],{"type":612,"value":1690},"    \"\"\"Add sample data to tables\"\"\"\n",{"type":606,"tag":636,"props":1692,"children":1693},{"class":638,"line":329},[1694,1698,1702],{"type":606,"tag":636,"props":1695,"children":1696},{"style":648},[1697],{"type":612,"value":1435},{"type":606,"tag":636,"props":1699,"children":1700},{"style":642},[1701],{"type":612,"value":681},{"type":606,"tag":636,"props":1703,"children":1704},{"style":648},[1705],{"type":612,"value":714},{"type":606,"tag":636,"props":1707,"children":1708},{"class":638,"line":338},[1709],{"type":606,"tag":636,"props":1710,"children":1711},{"style":648},[1712],{"type":612,"value":1451},{"type":606,"tag":636,"props":1714,"children":1715},{"class":638,"line":347},[1716],{"type":606,"tag":636,"props":1717,"children":1718},{"style":665},[1719],{"type":612,"value":1720},"    # Add users\n",{"type":606,"tag":636,"props":1722,"children":1723},{"class":638,"line":356},[1724,1729,1733],{"type":606,"tag":636,"props":1725,"children":1726},{"style":648},[1727],{"type":612,"value":1728},"    users ",{"type":606,"tag":636,"props":1730,"children":1731},{"style":642},[1732],{"type":612,"value":681},{"type":606,"tag":636,"props":1734,"children":1735},{"style":648},[1736],{"type":612,"value":835},{"type":606,"tag":636,"props":1738,"children":1739},{"class":638,"line":367},[1740,1745,1750,1754,1758],{"type":606,"tag":636,"props":1741,"children":1742},{"style":648},[1743],{"type":612,"value":1744},"        (",{"type":606,"tag":636,"props":1746,"children":1747},{"style":689},[1748],{"type":612,"value":1749},"'alice123'",{"type":606,"tag":636,"props":1751,"children":1752},{"style":648},[1753],{"type":612,"value":853},{"type":606,"tag":636,"props":1755,"children":1756},{"style":689},[1757],{"type":612,"value":858},{"type":606,"tag":636,"props":1759,"children":1760},{"style":648},[1761],{"type":612,"value":873},{"type":606,"tag":636,"props":1763,"children":1764},{"class":638,"line":376},[1765,1769,1774,1778,1782],{"type":606,"tag":636,"props":1766,"children":1767},{"style":648},[1768],{"type":612,"value":1744},{"type":606,"tag":636,"props":1770,"children":1771},{"style":689},[1772],{"type":612,"value":1773},"'bob456'",{"type":606,"tag":636,"props":1775,"children":1776},{"style":648},[1777],{"type":612,"value":853},{"type":606,"tag":636,"props":1779,"children":1780},{"style":689},[1781],{"type":612,"value":894},{"type":606,"tag":636,"props":1783,"children":1784},{"style":648},[1785],{"type":612,"value":873},{"type":606,"tag":636,"props":1787,"children":1788},{"class":638,"line":385},[1789,1793,1798,1802,1806],{"type":606,"tag":636,"props":1790,"children":1791},{"style":648},[1792],{"type":612,"value":1744},{"type":606,"tag":636,"props":1794,"children":1795},{"style":689},[1796],{"type":612,"value":1797},"'charlie789'",{"type":606,"tag":636,"props":1799,"children":1800},{"style":648},[1801],{"type":612,"value":853},{"type":606,"tag":636,"props":1803,"children":1804},{"style":689},[1805],{"type":612,"value":928},{"type":606,"tag":636,"props":1807,"children":1808},{"style":648},[1809],{"type":612,"value":697},{"type":606,"tag":636,"props":1811,"children":1812},{"class":638,"line":394},[1813],{"type":606,"tag":636,"props":1814,"children":1815},{"style":648},[1816],{"type":612,"value":1817},"    ]\n",{"type":606,"tag":636,"props":1819,"children":1820},{"class":638,"line":403},[1821],{"type":606,"tag":636,"props":1822,"children":1823},{"style":648},[1824],{"type":612,"value":1451},{"type":606,"tag":636,"props":1826,"children":1827},{"class":638,"line":412},[1828,1833,1838],{"type":606,"tag":636,"props":1829,"children":1830},{"style":648},[1831],{"type":612,"value":1832},"    cursor.executemany(",{"type":606,"tag":636,"props":1834,"children":1835},{"style":689},[1836],{"type":612,"value":1837},"'INSERT OR IGNORE INTO users (username, email) VALUES (?, ?)'",{"type":606,"tag":636,"props":1839,"children":1840},{"style":648},[1841],{"type":612,"value":1842},", users)\n",{"type":606,"tag":636,"props":1844,"children":1845},{"class":638,"line":423},[1846],{"type":606,"tag":636,"props":1847,"children":1848},{"style":648},[1849],{"type":612,"value":1451},{"type":606,"tag":636,"props":1851,"children":1852},{"class":638,"line":432},[1853],{"type":606,"tag":636,"props":1854,"children":1855},{"style":665},[1856],{"type":612,"value":1857},"    # Add posts\n",{"type":606,"tag":636,"props":1859,"children":1860},{"class":638,"line":441},[1861,1866,1870],{"type":606,"tag":636,"props":1862,"children":1863},{"style":648},[1864],{"type":612,"value":1865},"    posts ",{"type":606,"tag":636,"props":1867,"children":1868},{"style":642},[1869],{"type":612,"value":681},{"type":606,"tag":636,"props":1871,"children":1872},{"style":648},[1873],{"type":612,"value":835},{"type":606,"tag":636,"props":1875,"children":1876},{"class":638,"line":450},[1877,1881,1886,1890,1895,1899,1903],{"type":606,"tag":636,"props":1878,"children":1879},{"style":648},[1880],{"type":612,"value":1744},{"type":606,"tag":636,"props":1882,"children":1883},{"style":689},[1884],{"type":612,"value":1885},"'My First Post'",{"type":606,"tag":636,"props":1887,"children":1888},{"style":648},[1889],{"type":612,"value":853},{"type":606,"tag":636,"props":1891,"children":1892},{"style":689},[1893],{"type":612,"value":1894},"'This is the content of my first post'",{"type":606,"tag":636,"props":1896,"children":1897},{"style":648},[1898],{"type":612,"value":853},{"type":606,"tag":636,"props":1900,"children":1901},{"style":865},[1902],{"type":612,"value":1111},{"type":606,"tag":636,"props":1904,"children":1905},{"style":648},[1906],{"type":612,"value":873},{"type":606,"tag":636,"props":1908,"children":1909},{"class":638,"line":459},[1910,1914,1919,1923,1928,1932,1936],{"type":606,"tag":636,"props":1911,"children":1912},{"style":648},[1913],{"type":612,"value":1744},{"type":606,"tag":636,"props":1915,"children":1916},{"style":689},[1917],{"type":612,"value":1918},"'Python Tips'",{"type":606,"tag":636,"props":1920,"children":1921},{"style":648},[1922],{"type":612,"value":853},{"type":606,"tag":636,"props":1924,"children":1925},{"style":689},[1926],{"type":612,"value":1927},"'Here are some useful Python tips'",{"type":606,"tag":636,"props":1929,"children":1930},{"style":648},[1931],{"type":612,"value":853},{"type":606,"tag":636,"props":1933,"children":1934},{"style":865},[1935],{"type":612,"value":1111},{"type":606,"tag":636,"props":1937,"children":1938},{"style":648},[1939],{"type":612,"value":873},{"type":606,"tag":636,"props":1941,"children":1942},{"class":638,"line":468},[1943,1947,1952,1956,1961,1965,1970],{"type":606,"tag":636,"props":1944,"children":1945},{"style":648},[1946],{"type":612,"value":1744},{"type":606,"tag":636,"props":1948,"children":1949},{"style":689},[1950],{"type":612,"value":1951},"'Database Tutorial'",{"type":606,"tag":636,"props":1953,"children":1954},{"style":648},[1955],{"type":612,"value":853},{"type":606,"tag":636,"props":1957,"children":1958},{"style":689},[1959],{"type":612,"value":1960},"'Learning about databases'",{"type":606,"tag":636,"props":1962,"children":1963},{"style":648},[1964],{"type":612,"value":853},{"type":606,"tag":636,"props":1966,"children":1967},{"style":865},[1968],{"type":612,"value":1969},"2",{"type":606,"tag":636,"props":1971,"children":1972},{"style":648},[1973],{"type":612,"value":873},{"type":606,"tag":636,"props":1975,"children":1976},{"class":638,"line":477},[1977,1981,1986,1990,1995,1999,2003],{"type":606,"tag":636,"props":1978,"children":1979},{"style":648},[1980],{"type":612,"value":1744},{"type":606,"tag":636,"props":1982,"children":1983},{"style":689},[1984],{"type":612,"value":1985},"'Web Development'",{"type":606,"tag":636,"props":1987,"children":1988},{"style":648},[1989],{"type":612,"value":853},{"type":606,"tag":636,"props":1991,"children":1992},{"style":689},[1993],{"type":612,"value":1994},"'Building web applications'",{"type":606,"tag":636,"props":1996,"children":1997},{"style":648},[1998],{"type":612,"value":853},{"type":606,"tag":636,"props":2000,"children":2001},{"style":865},[2002],{"type":612,"value":1139},{"type":606,"tag":636,"props":2004,"children":2005},{"style":648},[2006],{"type":612,"value":697},{"type":606,"tag":636,"props":2008,"children":2009},{"class":638,"line":488},[2010],{"type":606,"tag":636,"props":2011,"children":2012},{"style":648},[2013],{"type":612,"value":1817},{"type":606,"tag":636,"props":2015,"children":2016},{"class":638,"line":497},[2017],{"type":606,"tag":636,"props":2018,"children":2019},{"style":648},[2020],{"type":612,"value":1451},{"type":606,"tag":636,"props":2022,"children":2023},{"class":638,"line":506},[2024,2028,2033],{"type":606,"tag":636,"props":2025,"children":2026},{"style":648},[2027],{"type":612,"value":1832},{"type":606,"tag":636,"props":2029,"children":2030},{"style":689},[2031],{"type":612,"value":2032},"'INSERT INTO posts (title, content, user_id) VALUES (?, ?, ?)'",{"type":606,"tag":636,"props":2034,"children":2035},{"style":648},[2036],{"type":612,"value":2037},", posts)\n",{"type":606,"tag":636,"props":2039,"children":2040},{"class":638,"line":515},[2041],{"type":606,"tag":636,"props":2042,"children":2043},{"style":648},[2044],{"type":612,"value":1451},{"type":606,"tag":636,"props":2046,"children":2047},{"class":638,"line":524},[2048],{"type":606,"tag":636,"props":2049,"children":2050},{"style":648},[2051],{"type":612,"value":1645},{"type":606,"tag":636,"props":2053,"children":2054},{"class":638,"line":533},[2055,2059,2063,2068],{"type":606,"tag":636,"props":2056,"children":2057},{"style":865},[2058],{"type":612,"value":1082},{"type":606,"tag":636,"props":2060,"children":2061},{"style":648},[2062],{"type":612,"value":1042},{"type":606,"tag":636,"props":2064,"children":2065},{"style":689},[2066],{"type":612,"value":2067},"\"Sample data added successfully\"",{"type":606,"tag":636,"props":2069,"children":2070},{"style":648},[2071],{"type":612,"value":697},{"type":606,"tag":636,"props":2073,"children":2074},{"class":638,"line":544},[2075],{"type":606,"tag":636,"props":2076,"children":2077},{"emptyLinePlaceholder":13},[2078],{"type":612,"value":659},{"type":606,"tag":636,"props":2080,"children":2081},{"class":638,"line":553},[2082],{"type":606,"tag":636,"props":2083,"children":2084},{"style":665},[2085],{"type":612,"value":2086},"# Create database and add data\n",{"type":606,"tag":636,"props":2088,"children":2089},{"class":638,"line":562},[2090,2094,2098],{"type":606,"tag":636,"props":2091,"children":2092},{"style":648},[2093],{"type":612,"value":676},{"type":606,"tag":636,"props":2095,"children":2096},{"style":642},[2097],{"type":612,"value":681},{"type":606,"tag":636,"props":2099,"children":2100},{"style":648},[2101],{"type":612,"value":2102}," create_database()\n",{"type":606,"tag":636,"props":2104,"children":2105},{"class":638,"line":571},[2106],{"type":606,"tag":636,"props":2107,"children":2108},{"style":648},[2109],{"type":612,"value":2110},"add_sample_data(conn)\n",{"type":606,"tag":636,"props":2112,"children":2113},{"class":638,"line":580},[2114],{"type":606,"tag":636,"props":2115,"children":2116},{"style":648},[2117],{"type":612,"value":1171},{"type":606,"tag":1342,"props":2119,"children":2121},{"id":2120},"querying-data",[2122],{"type":612,"value":2123},"Querying Data",{"type":606,"tag":621,"props":2125,"children":2126},{},[2127],{"type":606,"tag":625,"props":2128,"children":2130},{"className":627,"code":2129,"language":629,"meta":8,"style":8},"import sqlite3\n\ndef connect_database():\n    \"\"\"Connect to database with row factory for named access\"\"\"\n    conn = sqlite3.connect('example.db')\n    # Enable row factory for named column access\n    conn.row_factory = sqlite3.Row\n    return conn\n\ndef get_all_users():\n    \"\"\"Retrieve all users\"\"\"\n    conn = connect_database()\n    cursor = conn.cursor()\n    \n    cursor.execute('SELECT * FROM users ORDER BY username')\n    users = cursor.fetchall()\n    \n    conn.close()\n    return users\n\ndef get_user_posts(username):\n    \"\"\"Get posts by a specific user\"\"\"\n    conn = connect_database()\n    cursor = conn.cursor()\n    \n    cursor.execute('''\n        SELECT p.title, p.content, p.created_date, u.username\n        FROM posts p\n        JOIN users u ON p.user_id = u.id\n        WHERE u.username = ?\n        ORDER BY p.created_date DESC\n    ''', (username,))\n    \n    posts = cursor.fetchall()\n    conn.close()\n    return posts\n\ndef search_posts(keyword):\n    \"\"\"Search posts by keyword in title or content\"\"\"\n    conn = connect_database()\n    cursor = conn.cursor()\n    \n    cursor.execute('''\n        SELECT p.title, p.content, u.username\n        FROM posts p\n        JOIN users u ON p.user_id = u.id\n        WHERE p.title LIKE ? OR p.content LIKE ?\n        ORDER BY p.title\n    ''', (f'%{keyword}%', f'%{keyword}%'))\n    \n    results = cursor.fetchall()\n    conn.close()\n    return results\n\n# Test queries\nprint(\"All users:\")\nusers = get_all_users()\nfor user in users:\n    print(f\"  {user['username']} - {user['email']}\")\n\nprint(\"\\nPosts by alice123:\")\nalice_posts = get_user_posts('alice123')\nfor post in alice_posts:\n    print(f\"  {post['title']}\")\n\nprint(\"\\nPosts containing 'Python':\")\npython_posts = search_posts('Python')\nfor post in python_posts:\n    print(f\"  {post['title']} by {post['username']}\")\n",[2131],{"type":606,"tag":632,"props":2132,"children":2133},{"__ignoreMap":8},[2134,2145,2152,2168,2176,2199,2207,2224,2235,2242,2258,2266,2282,2297,2304,2320,2335,2342,2350,2362,2369,2386,2394,2409,2424,2431,2442,2450,2458,2466,2474,2482,2494,2501,2516,2523,2535,2542,2559,2567,2582,2597,2604,2615,2623,2630,2637,2645,2653,2725,2732,2748,2755,2767,2774,2782,2802,2819,2839,2914,2921,2950,2975,2996,3046,3054,3083,3110,3131],{"type":606,"tag":636,"props":2135,"children":2136},{"class":638,"line":12},[2137,2141],{"type":606,"tag":636,"props":2138,"children":2139},{"style":642},[2140],{"type":612,"value":645},{"type":606,"tag":636,"props":2142,"children":2143},{"style":648},[2144],{"type":612,"value":651},{"type":606,"tag":636,"props":2146,"children":2147},{"class":638,"line":27},[2148],{"type":606,"tag":636,"props":2149,"children":2150},{"emptyLinePlaceholder":13},[2151],{"type":612,"value":659},{"type":606,"tag":636,"props":2153,"children":2154},{"class":638,"line":36},[2155,2159,2164],{"type":606,"tag":636,"props":2156,"children":2157},{"style":642},[2158],{"type":612,"value":1383},{"type":606,"tag":636,"props":2160,"children":2161},{"style":1386},[2162],{"type":612,"value":2163}," connect_database",{"type":606,"tag":636,"props":2165,"children":2166},{"style":648},[2167],{"type":612,"value":1394},{"type":606,"tag":636,"props":2169,"children":2170},{"class":638,"line":45},[2171],{"type":606,"tag":636,"props":2172,"children":2173},{"style":689},[2174],{"type":612,"value":2175},"    \"\"\"Connect to database with row factory for named access\"\"\"\n",{"type":606,"tag":636,"props":2177,"children":2178},{"class":638,"line":54},[2179,2183,2187,2191,2195],{"type":606,"tag":636,"props":2180,"children":2181},{"style":648},[2182],{"type":612,"value":1410},{"type":606,"tag":636,"props":2184,"children":2185},{"style":642},[2186],{"type":612,"value":681},{"type":606,"tag":636,"props":2188,"children":2189},{"style":648},[2190],{"type":612,"value":686},{"type":606,"tag":636,"props":2192,"children":2193},{"style":689},[2194],{"type":612,"value":1423},{"type":606,"tag":636,"props":2196,"children":2197},{"style":648},[2198],{"type":612,"value":697},{"type":606,"tag":636,"props":2200,"children":2201},{"class":638,"line":63},[2202],{"type":606,"tag":636,"props":2203,"children":2204},{"style":665},[2205],{"type":612,"value":2206},"    # Enable row factory for named column access\n",{"type":606,"tag":636,"props":2208,"children":2209},{"class":638,"line":72},[2210,2215,2219],{"type":606,"tag":636,"props":2211,"children":2212},{"style":648},[2213],{"type":612,"value":2214},"    conn.row_factory ",{"type":606,"tag":636,"props":2216,"children":2217},{"style":642},[2218],{"type":612,"value":681},{"type":606,"tag":636,"props":2220,"children":2221},{"style":648},[2222],{"type":612,"value":2223}," sqlite3.Row\n",{"type":606,"tag":636,"props":2225,"children":2226},{"class":638,"line":81},[2227,2231],{"type":606,"tag":636,"props":2228,"children":2229},{"style":642},[2230],{"type":612,"value":1653},{"type":606,"tag":636,"props":2232,"children":2233},{"style":648},[2234],{"type":612,"value":1658},{"type":606,"tag":636,"props":2236,"children":2237},{"class":638,"line":745},[2238],{"type":606,"tag":636,"props":2239,"children":2240},{"emptyLinePlaceholder":13},[2241],{"type":612,"value":659},{"type":606,"tag":636,"props":2243,"children":2244},{"class":638,"line":99},[2245,2249,2254],{"type":606,"tag":636,"props":2246,"children":2247},{"style":642},[2248],{"type":612,"value":1383},{"type":606,"tag":636,"props":2250,"children":2251},{"style":1386},[2252],{"type":612,"value":2253}," get_all_users",{"type":606,"tag":636,"props":2255,"children":2256},{"style":648},[2257],{"type":612,"value":1394},{"type":606,"tag":636,"props":2259,"children":2260},{"class":638,"line":108},[2261],{"type":606,"tag":636,"props":2262,"children":2263},{"style":689},[2264],{"type":612,"value":2265},"    \"\"\"Retrieve all users\"\"\"\n",{"type":606,"tag":636,"props":2267,"children":2268},{"class":638,"line":117},[2269,2273,2277],{"type":606,"tag":636,"props":2270,"children":2271},{"style":648},[2272],{"type":612,"value":1410},{"type":606,"tag":636,"props":2274,"children":2275},{"style":642},[2276],{"type":612,"value":681},{"type":606,"tag":636,"props":2278,"children":2279},{"style":648},[2280],{"type":612,"value":2281}," connect_database()\n",{"type":606,"tag":636,"props":2283,"children":2284},{"class":638,"line":126},[2285,2289,2293],{"type":606,"tag":636,"props":2286,"children":2287},{"style":648},[2288],{"type":612,"value":1435},{"type":606,"tag":636,"props":2290,"children":2291},{"style":642},[2292],{"type":612,"value":681},{"type":606,"tag":636,"props":2294,"children":2295},{"style":648},[2296],{"type":612,"value":714},{"type":606,"tag":636,"props":2298,"children":2299},{"class":638,"line":135},[2300],{"type":606,"tag":636,"props":2301,"children":2302},{"style":648},[2303],{"type":612,"value":1451},{"type":606,"tag":636,"props":2305,"children":2306},{"class":638,"line":144},[2307,2311,2316],{"type":606,"tag":636,"props":2308,"children":2309},{"style":648},[2310],{"type":612,"value":1467},{"type":606,"tag":636,"props":2312,"children":2313},{"style":689},[2314],{"type":612,"value":2315},"'SELECT * FROM users ORDER BY username'",{"type":606,"tag":636,"props":2317,"children":2318},{"style":648},[2319],{"type":612,"value":697},{"type":606,"tag":636,"props":2321,"children":2322},{"class":638,"line":153},[2323,2327,2331],{"type":606,"tag":636,"props":2324,"children":2325},{"style":648},[2326],{"type":612,"value":1728},{"type":606,"tag":636,"props":2328,"children":2329},{"style":642},[2330],{"type":612,"value":681},{"type":606,"tag":636,"props":2332,"children":2333},{"style":648},[2334],{"type":612,"value":1022},{"type":606,"tag":636,"props":2336,"children":2337},{"class":638,"line":163},[2338],{"type":606,"tag":636,"props":2339,"children":2340},{"style":648},[2341],{"type":612,"value":1451},{"type":606,"tag":636,"props":2343,"children":2344},{"class":638,"line":172},[2345],{"type":606,"tag":636,"props":2346,"children":2347},{"style":648},[2348],{"type":612,"value":2349},"    conn.close()\n",{"type":606,"tag":636,"props":2351,"children":2352},{"class":638,"line":181},[2353,2357],{"type":606,"tag":636,"props":2354,"children":2355},{"style":642},[2356],{"type":612,"value":1653},{"type":606,"tag":636,"props":2358,"children":2359},{"style":648},[2360],{"type":612,"value":2361}," users\n",{"type":606,"tag":636,"props":2363,"children":2364},{"class":638,"line":190},[2365],{"type":606,"tag":636,"props":2366,"children":2367},{"emptyLinePlaceholder":13},[2368],{"type":612,"value":659},{"type":606,"tag":636,"props":2370,"children":2371},{"class":638,"line":199},[2372,2376,2381],{"type":606,"tag":636,"props":2373,"children":2374},{"style":642},[2375],{"type":612,"value":1383},{"type":606,"tag":636,"props":2377,"children":2378},{"style":1386},[2379],{"type":612,"value":2380}," get_user_posts",{"type":606,"tag":636,"props":2382,"children":2383},{"style":648},[2384],{"type":612,"value":2385},"(username):\n",{"type":606,"tag":636,"props":2387,"children":2388},{"class":638,"line":208},[2389],{"type":606,"tag":636,"props":2390,"children":2391},{"style":689},[2392],{"type":612,"value":2393},"    \"\"\"Get posts by a specific user\"\"\"\n",{"type":606,"tag":636,"props":2395,"children":2396},{"class":638,"line":217},[2397,2401,2405],{"type":606,"tag":636,"props":2398,"children":2399},{"style":648},[2400],{"type":612,"value":1410},{"type":606,"tag":636,"props":2402,"children":2403},{"style":642},[2404],{"type":612,"value":681},{"type":606,"tag":636,"props":2406,"children":2407},{"style":648},[2408],{"type":612,"value":2281},{"type":606,"tag":636,"props":2410,"children":2411},{"class":638,"line":227},[2412,2416,2420],{"type":606,"tag":636,"props":2413,"children":2414},{"style":648},[2415],{"type":612,"value":1435},{"type":606,"tag":636,"props":2417,"children":2418},{"style":642},[2419],{"type":612,"value":681},{"type":606,"tag":636,"props":2421,"children":2422},{"style":648},[2423],{"type":612,"value":714},{"type":606,"tag":636,"props":2425,"children":2426},{"class":638,"line":236},[2427],{"type":606,"tag":636,"props":2428,"children":2429},{"style":648},[2430],{"type":612,"value":1451},{"type":606,"tag":636,"props":2432,"children":2433},{"class":638,"line":245},[2434,2438],{"type":606,"tag":636,"props":2435,"children":2436},{"style":648},[2437],{"type":612,"value":1467},{"type":606,"tag":636,"props":2439,"children":2440},{"style":689},[2441],{"type":612,"value":742},{"type":606,"tag":636,"props":2443,"children":2444},{"class":638,"line":254},[2445],{"type":606,"tag":636,"props":2446,"children":2447},{"style":689},[2448],{"type":612,"value":2449},"        SELECT p.title, p.content, p.created_date, u.username\n",{"type":606,"tag":636,"props":2451,"children":2452},{"class":638,"line":263},[2453],{"type":606,"tag":636,"props":2454,"children":2455},{"style":689},[2456],{"type":612,"value":2457},"        FROM posts p\n",{"type":606,"tag":636,"props":2459,"children":2460},{"class":638,"line":272},[2461],{"type":606,"tag":636,"props":2462,"children":2463},{"style":689},[2464],{"type":612,"value":2465},"        JOIN users u ON p.user_id = u.id\n",{"type":606,"tag":636,"props":2467,"children":2468},{"class":638,"line":281},[2469],{"type":606,"tag":636,"props":2470,"children":2471},{"style":689},[2472],{"type":612,"value":2473},"        WHERE u.username = ?\n",{"type":606,"tag":636,"props":2475,"children":2476},{"class":638,"line":291},[2477],{"type":606,"tag":636,"props":2478,"children":2479},{"style":689},[2480],{"type":612,"value":2481},"        ORDER BY p.created_date DESC\n",{"type":606,"tag":636,"props":2483,"children":2484},{"class":638,"line":302},[2485,2489],{"type":606,"tag":636,"props":2486,"children":2487},{"style":689},[2488],{"type":612,"value":1527},{"type":606,"tag":636,"props":2490,"children":2491},{"style":648},[2492],{"type":612,"value":2493},", (username,))\n",{"type":606,"tag":636,"props":2495,"children":2496},{"class":638,"line":311},[2497],{"type":606,"tag":636,"props":2498,"children":2499},{"style":648},[2500],{"type":612,"value":1451},{"type":606,"tag":636,"props":2502,"children":2503},{"class":638,"line":320},[2504,2508,2512],{"type":606,"tag":636,"props":2505,"children":2506},{"style":648},[2507],{"type":612,"value":1865},{"type":606,"tag":636,"props":2509,"children":2510},{"style":642},[2511],{"type":612,"value":681},{"type":606,"tag":636,"props":2513,"children":2514},{"style":648},[2515],{"type":612,"value":1022},{"type":606,"tag":636,"props":2517,"children":2518},{"class":638,"line":329},[2519],{"type":606,"tag":636,"props":2520,"children":2521},{"style":648},[2522],{"type":612,"value":2349},{"type":606,"tag":636,"props":2524,"children":2525},{"class":638,"line":338},[2526,2530],{"type":606,"tag":636,"props":2527,"children":2528},{"style":642},[2529],{"type":612,"value":1653},{"type":606,"tag":636,"props":2531,"children":2532},{"style":648},[2533],{"type":612,"value":2534}," posts\n",{"type":606,"tag":636,"props":2536,"children":2537},{"class":638,"line":347},[2538],{"type":606,"tag":636,"props":2539,"children":2540},{"emptyLinePlaceholder":13},[2541],{"type":612,"value":659},{"type":606,"tag":636,"props":2543,"children":2544},{"class":638,"line":356},[2545,2549,2554],{"type":606,"tag":636,"props":2546,"children":2547},{"style":642},[2548],{"type":612,"value":1383},{"type":606,"tag":636,"props":2550,"children":2551},{"style":1386},[2552],{"type":612,"value":2553}," search_posts",{"type":606,"tag":636,"props":2555,"children":2556},{"style":648},[2557],{"type":612,"value":2558},"(keyword):\n",{"type":606,"tag":636,"props":2560,"children":2561},{"class":638,"line":367},[2562],{"type":606,"tag":636,"props":2563,"children":2564},{"style":689},[2565],{"type":612,"value":2566},"    \"\"\"Search posts by keyword in title or content\"\"\"\n",{"type":606,"tag":636,"props":2568,"children":2569},{"class":638,"line":376},[2570,2574,2578],{"type":606,"tag":636,"props":2571,"children":2572},{"style":648},[2573],{"type":612,"value":1410},{"type":606,"tag":636,"props":2575,"children":2576},{"style":642},[2577],{"type":612,"value":681},{"type":606,"tag":636,"props":2579,"children":2580},{"style":648},[2581],{"type":612,"value":2281},{"type":606,"tag":636,"props":2583,"children":2584},{"class":638,"line":385},[2585,2589,2593],{"type":606,"tag":636,"props":2586,"children":2587},{"style":648},[2588],{"type":612,"value":1435},{"type":606,"tag":636,"props":2590,"children":2591},{"style":642},[2592],{"type":612,"value":681},{"type":606,"tag":636,"props":2594,"children":2595},{"style":648},[2596],{"type":612,"value":714},{"type":606,"tag":636,"props":2598,"children":2599},{"class":638,"line":394},[2600],{"type":606,"tag":636,"props":2601,"children":2602},{"style":648},[2603],{"type":612,"value":1451},{"type":606,"tag":636,"props":2605,"children":2606},{"class":638,"line":403},[2607,2611],{"type":606,"tag":636,"props":2608,"children":2609},{"style":648},[2610],{"type":612,"value":1467},{"type":606,"tag":636,"props":2612,"children":2613},{"style":689},[2614],{"type":612,"value":742},{"type":606,"tag":636,"props":2616,"children":2617},{"class":638,"line":412},[2618],{"type":606,"tag":636,"props":2619,"children":2620},{"style":689},[2621],{"type":612,"value":2622},"        SELECT p.title, p.content, u.username\n",{"type":606,"tag":636,"props":2624,"children":2625},{"class":638,"line":423},[2626],{"type":606,"tag":636,"props":2627,"children":2628},{"style":689},[2629],{"type":612,"value":2457},{"type":606,"tag":636,"props":2631,"children":2632},{"class":638,"line":432},[2633],{"type":606,"tag":636,"props":2634,"children":2635},{"style":689},[2636],{"type":612,"value":2465},{"type":606,"tag":636,"props":2638,"children":2639},{"class":638,"line":441},[2640],{"type":606,"tag":636,"props":2641,"children":2642},{"style":689},[2643],{"type":612,"value":2644},"        WHERE p.title LIKE ? OR p.content LIKE ?\n",{"type":606,"tag":636,"props":2646,"children":2647},{"class":638,"line":450},[2648],{"type":606,"tag":636,"props":2649,"children":2650},{"style":689},[2651],{"type":612,"value":2652},"        ORDER BY p.title\n",{"type":606,"tag":636,"props":2654,"children":2655},{"class":638,"line":459},[2656,2660,2665,2669,2674,2678,2683,2687,2692,2696,2700,2704,2708,2712,2716,2720],{"type":606,"tag":636,"props":2657,"children":2658},{"style":689},[2659],{"type":612,"value":1527},{"type":606,"tag":636,"props":2661,"children":2662},{"style":648},[2663],{"type":612,"value":2664},", (",{"type":606,"tag":636,"props":2666,"children":2667},{"style":642},[2668],{"type":612,"value":1091},{"type":606,"tag":636,"props":2670,"children":2671},{"style":689},[2672],{"type":612,"value":2673},"'%",{"type":606,"tag":636,"props":2675,"children":2676},{"style":865},[2677],{"type":612,"value":1101},{"type":606,"tag":636,"props":2679,"children":2680},{"style":648},[2681],{"type":612,"value":2682},"keyword",{"type":606,"tag":636,"props":2684,"children":2685},{"style":865},[2686],{"type":612,"value":1121},{"type":606,"tag":636,"props":2688,"children":2689},{"style":689},[2690],{"type":612,"value":2691},"%'",{"type":606,"tag":636,"props":2693,"children":2694},{"style":648},[2695],{"type":612,"value":853},{"type":606,"tag":636,"props":2697,"children":2698},{"style":642},[2699],{"type":612,"value":1091},{"type":606,"tag":636,"props":2701,"children":2702},{"style":689},[2703],{"type":612,"value":2673},{"type":606,"tag":636,"props":2705,"children":2706},{"style":865},[2707],{"type":612,"value":1101},{"type":606,"tag":636,"props":2709,"children":2710},{"style":648},[2711],{"type":612,"value":2682},{"type":606,"tag":636,"props":2713,"children":2714},{"style":865},[2715],{"type":612,"value":1121},{"type":606,"tag":636,"props":2717,"children":2718},{"style":689},[2719],{"type":612,"value":2691},{"type":606,"tag":636,"props":2721,"children":2722},{"style":648},[2723],{"type":612,"value":2724},"))\n",{"type":606,"tag":636,"props":2726,"children":2727},{"class":638,"line":468},[2728],{"type":606,"tag":636,"props":2729,"children":2730},{"style":648},[2731],{"type":612,"value":1451},{"type":606,"tag":636,"props":2733,"children":2734},{"class":638,"line":477},[2735,2740,2744],{"type":606,"tag":636,"props":2736,"children":2737},{"style":648},[2738],{"type":612,"value":2739},"    results ",{"type":606,"tag":636,"props":2741,"children":2742},{"style":642},[2743],{"type":612,"value":681},{"type":606,"tag":636,"props":2745,"children":2746},{"style":648},[2747],{"type":612,"value":1022},{"type":606,"tag":636,"props":2749,"children":2750},{"class":638,"line":488},[2751],{"type":606,"tag":636,"props":2752,"children":2753},{"style":648},[2754],{"type":612,"value":2349},{"type":606,"tag":636,"props":2756,"children":2757},{"class":638,"line":497},[2758,2762],{"type":606,"tag":636,"props":2759,"children":2760},{"style":642},[2761],{"type":612,"value":1653},{"type":606,"tag":636,"props":2763,"children":2764},{"style":648},[2765],{"type":612,"value":2766}," results\n",{"type":606,"tag":636,"props":2768,"children":2769},{"class":638,"line":506},[2770],{"type":606,"tag":636,"props":2771,"children":2772},{"emptyLinePlaceholder":13},[2773],{"type":612,"value":659},{"type":606,"tag":636,"props":2775,"children":2776},{"class":638,"line":515},[2777],{"type":606,"tag":636,"props":2778,"children":2779},{"style":665},[2780],{"type":612,"value":2781},"# Test queries\n",{"type":606,"tag":636,"props":2783,"children":2784},{"class":638,"line":524},[2785,2789,2793,2798],{"type":606,"tag":636,"props":2786,"children":2787},{"style":865},[2788],{"type":612,"value":1037},{"type":606,"tag":636,"props":2790,"children":2791},{"style":648},[2792],{"type":612,"value":1042},{"type":606,"tag":636,"props":2794,"children":2795},{"style":689},[2796],{"type":612,"value":2797},"\"All users:\"",{"type":606,"tag":636,"props":2799,"children":2800},{"style":648},[2801],{"type":612,"value":697},{"type":606,"tag":636,"props":2803,"children":2804},{"class":638,"line":533},[2805,2810,2814],{"type":606,"tag":636,"props":2806,"children":2807},{"style":648},[2808],{"type":612,"value":2809},"users ",{"type":606,"tag":636,"props":2811,"children":2812},{"style":642},[2813],{"type":612,"value":681},{"type":606,"tag":636,"props":2815,"children":2816},{"style":648},[2817],{"type":612,"value":2818}," get_all_users()\n",{"type":606,"tag":636,"props":2820,"children":2821},{"class":638,"line":544},[2822,2826,2830,2834],{"type":606,"tag":636,"props":2823,"children":2824},{"style":642},[2825],{"type":612,"value":1059},{"type":606,"tag":636,"props":2827,"children":2828},{"style":648},[2829],{"type":612,"value":1064},{"type":606,"tag":636,"props":2831,"children":2832},{"style":642},[2833],{"type":612,"value":1069},{"type":606,"tag":636,"props":2835,"children":2836},{"style":648},[2837],{"type":612,"value":2838}," users:\n",{"type":606,"tag":636,"props":2840,"children":2841},{"class":638,"line":553},[2842,2846,2850,2854,2858,2862,2866,2871,2875,2879,2884,2888,2892,2897,2901,2905,2910],{"type":606,"tag":636,"props":2843,"children":2844},{"style":865},[2845],{"type":612,"value":1082},{"type":606,"tag":636,"props":2847,"children":2848},{"style":648},[2849],{"type":612,"value":1042},{"type":606,"tag":636,"props":2851,"children":2852},{"style":642},[2853],{"type":612,"value":1091},{"type":606,"tag":636,"props":2855,"children":2856},{"style":689},[2857],{"type":612,"value":1096},{"type":606,"tag":636,"props":2859,"children":2860},{"style":865},[2861],{"type":612,"value":1101},{"type":606,"tag":636,"props":2863,"children":2864},{"style":648},[2865],{"type":612,"value":1106},{"type":606,"tag":636,"props":2867,"children":2868},{"style":689},[2869],{"type":612,"value":2870},"'username'",{"type":606,"tag":636,"props":2872,"children":2873},{"style":648},[2874],{"type":612,"value":1116},{"type":606,"tag":636,"props":2876,"children":2877},{"style":865},[2878],{"type":612,"value":1121},{"type":606,"tag":636,"props":2880,"children":2881},{"style":689},[2882],{"type":612,"value":2883}," - ",{"type":606,"tag":636,"props":2885,"children":2886},{"style":865},[2887],{"type":612,"value":1101},{"type":606,"tag":636,"props":2889,"children":2890},{"style":648},[2891],{"type":612,"value":1106},{"type":606,"tag":636,"props":2893,"children":2894},{"style":689},[2895],{"type":612,"value":2896},"'email'",{"type":606,"tag":636,"props":2898,"children":2899},{"style":648},[2900],{"type":612,"value":1116},{"type":606,"tag":636,"props":2902,"children":2903},{"style":865},[2904],{"type":612,"value":1121},{"type":606,"tag":636,"props":2906,"children":2907},{"style":689},[2908],{"type":612,"value":2909},"\"",{"type":606,"tag":636,"props":2911,"children":2912},{"style":648},[2913],{"type":612,"value":697},{"type":606,"tag":636,"props":2915,"children":2916},{"class":638,"line":562},[2917],{"type":606,"tag":636,"props":2918,"children":2919},{"emptyLinePlaceholder":13},[2920],{"type":612,"value":659},{"type":606,"tag":636,"props":2922,"children":2923},{"class":638,"line":571},[2924,2928,2932,2936,2941,2946],{"type":606,"tag":636,"props":2925,"children":2926},{"style":865},[2927],{"type":612,"value":1037},{"type":606,"tag":636,"props":2929,"children":2930},{"style":648},[2931],{"type":612,"value":1042},{"type":606,"tag":636,"props":2933,"children":2934},{"style":689},[2935],{"type":612,"value":2909},{"type":606,"tag":636,"props":2937,"children":2938},{"style":865},[2939],{"type":612,"value":2940},"\\n",{"type":606,"tag":636,"props":2942,"children":2943},{"style":689},[2944],{"type":612,"value":2945},"Posts by alice123:\"",{"type":606,"tag":636,"props":2947,"children":2948},{"style":648},[2949],{"type":612,"value":697},{"type":606,"tag":636,"props":2951,"children":2952},{"class":638,"line":580},[2953,2958,2962,2967,2971],{"type":606,"tag":636,"props":2954,"children":2955},{"style":648},[2956],{"type":612,"value":2957},"alice_posts ",{"type":606,"tag":636,"props":2959,"children":2960},{"style":642},[2961],{"type":612,"value":681},{"type":606,"tag":636,"props":2963,"children":2964},{"style":648},[2965],{"type":612,"value":2966}," get_user_posts(",{"type":606,"tag":636,"props":2968,"children":2969},{"style":689},[2970],{"type":612,"value":1749},{"type":606,"tag":636,"props":2972,"children":2973},{"style":648},[2974],{"type":612,"value":697},{"type":606,"tag":636,"props":2976,"children":2977},{"class":638,"line":589},[2978,2982,2987,2991],{"type":606,"tag":636,"props":2979,"children":2980},{"style":642},[2981],{"type":612,"value":1059},{"type":606,"tag":636,"props":2983,"children":2984},{"style":648},[2985],{"type":612,"value":2986}," post ",{"type":606,"tag":636,"props":2988,"children":2989},{"style":642},[2990],{"type":612,"value":1069},{"type":606,"tag":636,"props":2992,"children":2993},{"style":648},[2994],{"type":612,"value":2995}," alice_posts:\n",{"type":606,"tag":636,"props":2997,"children":2999},{"class":638,"line":2998},64,[3000,3004,3008,3012,3016,3020,3025,3030,3034,3038,3042],{"type":606,"tag":636,"props":3001,"children":3002},{"style":865},[3003],{"type":612,"value":1082},{"type":606,"tag":636,"props":3005,"children":3006},{"style":648},[3007],{"type":612,"value":1042},{"type":606,"tag":636,"props":3009,"children":3010},{"style":642},[3011],{"type":612,"value":1091},{"type":606,"tag":636,"props":3013,"children":3014},{"style":689},[3015],{"type":612,"value":1096},{"type":606,"tag":636,"props":3017,"children":3018},{"style":865},[3019],{"type":612,"value":1101},{"type":606,"tag":636,"props":3021,"children":3022},{"style":648},[3023],{"type":612,"value":3024},"post[",{"type":606,"tag":636,"props":3026,"children":3027},{"style":689},[3028],{"type":612,"value":3029},"'title'",{"type":606,"tag":636,"props":3031,"children":3032},{"style":648},[3033],{"type":612,"value":1116},{"type":606,"tag":636,"props":3035,"children":3036},{"style":865},[3037],{"type":612,"value":1121},{"type":606,"tag":636,"props":3039,"children":3040},{"style":689},[3041],{"type":612,"value":2909},{"type":606,"tag":636,"props":3043,"children":3044},{"style":648},[3045],{"type":612,"value":697},{"type":606,"tag":636,"props":3047,"children":3049},{"class":638,"line":3048},65,[3050],{"type":606,"tag":636,"props":3051,"children":3052},{"emptyLinePlaceholder":13},[3053],{"type":612,"value":659},{"type":606,"tag":636,"props":3055,"children":3057},{"class":638,"line":3056},66,[3058,3062,3066,3070,3074,3079],{"type":606,"tag":636,"props":3059,"children":3060},{"style":865},[3061],{"type":612,"value":1037},{"type":606,"tag":636,"props":3063,"children":3064},{"style":648},[3065],{"type":612,"value":1042},{"type":606,"tag":636,"props":3067,"children":3068},{"style":689},[3069],{"type":612,"value":2909},{"type":606,"tag":636,"props":3071,"children":3072},{"style":865},[3073],{"type":612,"value":2940},{"type":606,"tag":636,"props":3075,"children":3076},{"style":689},[3077],{"type":612,"value":3078},"Posts containing 'Python':\"",{"type":606,"tag":636,"props":3080,"children":3081},{"style":648},[3082],{"type":612,"value":697},{"type":606,"tag":636,"props":3084,"children":3086},{"class":638,"line":3085},67,[3087,3092,3096,3101,3106],{"type":606,"tag":636,"props":3088,"children":3089},{"style":648},[3090],{"type":612,"value":3091},"python_posts ",{"type":606,"tag":636,"props":3093,"children":3094},{"style":642},[3095],{"type":612,"value":681},{"type":606,"tag":636,"props":3097,"children":3098},{"style":648},[3099],{"type":612,"value":3100}," search_posts(",{"type":606,"tag":636,"props":3102,"children":3103},{"style":689},[3104],{"type":612,"value":3105},"'Python'",{"type":606,"tag":636,"props":3107,"children":3108},{"style":648},[3109],{"type":612,"value":697},{"type":606,"tag":636,"props":3111,"children":3113},{"class":638,"line":3112},68,[3114,3118,3122,3126],{"type":606,"tag":636,"props":3115,"children":3116},{"style":642},[3117],{"type":612,"value":1059},{"type":606,"tag":636,"props":3119,"children":3120},{"style":648},[3121],{"type":612,"value":2986},{"type":606,"tag":636,"props":3123,"children":3124},{"style":642},[3125],{"type":612,"value":1069},{"type":606,"tag":636,"props":3127,"children":3128},{"style":648},[3129],{"type":612,"value":3130}," python_posts:\n",{"type":606,"tag":636,"props":3132,"children":3134},{"class":638,"line":3133},69,[3135,3139,3143,3147,3151,3155,3159,3163,3167,3171,3176,3180,3184,3188,3192,3196,3200],{"type":606,"tag":636,"props":3136,"children":3137},{"style":865},[3138],{"type":612,"value":1082},{"type":606,"tag":636,"props":3140,"children":3141},{"style":648},[3142],{"type":612,"value":1042},{"type":606,"tag":636,"props":3144,"children":3145},{"style":642},[3146],{"type":612,"value":1091},{"type":606,"tag":636,"props":3148,"children":3149},{"style":689},[3150],{"type":612,"value":1096},{"type":606,"tag":636,"props":3152,"children":3153},{"style":865},[3154],{"type":612,"value":1101},{"type":606,"tag":636,"props":3156,"children":3157},{"style":648},[3158],{"type":612,"value":3024},{"type":606,"tag":636,"props":3160,"children":3161},{"style":689},[3162],{"type":612,"value":3029},{"type":606,"tag":636,"props":3164,"children":3165},{"style":648},[3166],{"type":612,"value":1116},{"type":606,"tag":636,"props":3168,"children":3169},{"style":865},[3170],{"type":612,"value":1121},{"type":606,"tag":636,"props":3172,"children":3173},{"style":689},[3174],{"type":612,"value":3175}," by ",{"type":606,"tag":636,"props":3177,"children":3178},{"style":865},[3179],{"type":612,"value":1101},{"type":606,"tag":636,"props":3181,"children":3182},{"style":648},[3183],{"type":612,"value":3024},{"type":606,"tag":636,"props":3185,"children":3186},{"style":689},[3187],{"type":612,"value":2870},{"type":606,"tag":636,"props":3189,"children":3190},{"style":648},[3191],{"type":612,"value":1116},{"type":606,"tag":636,"props":3193,"children":3194},{"style":865},[3195],{"type":612,"value":1121},{"type":606,"tag":636,"props":3197,"children":3198},{"style":689},[3199],{"type":612,"value":2909},{"type":606,"tag":636,"props":3201,"children":3202},{"style":648},[3203],{"type":612,"value":697},{"type":606,"tag":1173,"props":3205,"children":3207},{"id":3206},"sql-commands-reference",[3208],{"type":612,"value":3209},"📋 SQL Commands Reference",{"type":606,"tag":3211,"props":3212,"children":3213},"table",{},[3214,3238],{"type":606,"tag":3215,"props":3216,"children":3217},"thead",{},[3218],{"type":606,"tag":3219,"props":3220,"children":3221},"tr",{},[3222,3228,3233],{"type":606,"tag":3223,"props":3224,"children":3225},"th",{},[3226],{"type":612,"value":3227},"Operation",{"type":606,"tag":3223,"props":3229,"children":3230},{},[3231],{"type":612,"value":3232},"SQL Example",{"type":606,"tag":3223,"props":3234,"children":3235},{},[3236],{"type":612,"value":3237},"Purpose",{"type":606,"tag":3239,"props":3240,"children":3241},"tbody",{},[3242,3265,3287,3308,3329,3351,3373,3395],{"type":606,"tag":3219,"props":3243,"children":3244},{},[3245,3251,3260],{"type":606,"tag":3246,"props":3247,"children":3248},"td",{},[3249],{"type":612,"value":3250},"Select",{"type":606,"tag":3246,"props":3252,"children":3253},{},[3254],{"type":606,"tag":632,"props":3255,"children":3257},{"className":3256},[],[3258],{"type":612,"value":3259},"SELECT * FROM table",{"type":606,"tag":3246,"props":3261,"children":3262},{},[3263],{"type":612,"value":3264},"Retrieve data",{"type":606,"tag":3219,"props":3266,"children":3267},{},[3268,3273,3282],{"type":606,"tag":3246,"props":3269,"children":3270},{},[3271],{"type":612,"value":3272},"Insert",{"type":606,"tag":3246,"props":3274,"children":3275},{},[3276],{"type":606,"tag":632,"props":3277,"children":3279},{"className":3278},[],[3280],{"type":612,"value":3281},"INSERT INTO table VALUES (...)",{"type":606,"tag":3246,"props":3283,"children":3284},{},[3285],{"type":612,"value":3286},"Add new record",{"type":606,"tag":3219,"props":3288,"children":3289},{},[3290,3294,3303],{"type":606,"tag":3246,"props":3291,"children":3292},{},[3293],{"type":612,"value":1232},{"type":606,"tag":3246,"props":3295,"children":3296},{},[3297],{"type":606,"tag":632,"props":3298,"children":3300},{"className":3299},[],[3301],{"type":612,"value":3302},"UPDATE table SET col=val WHERE ...",{"type":606,"tag":3246,"props":3304,"children":3305},{},[3306],{"type":612,"value":3307},"Modify record",{"type":606,"tag":3219,"props":3309,"children":3310},{},[3311,3315,3324],{"type":606,"tag":3246,"props":3312,"children":3313},{},[3314],{"type":612,"value":1242},{"type":606,"tag":3246,"props":3316,"children":3317},{},[3318],{"type":606,"tag":632,"props":3319,"children":3321},{"className":3320},[],[3322],{"type":612,"value":3323},"DELETE FROM table WHERE ...",{"type":606,"tag":3246,"props":3325,"children":3326},{},[3327],{"type":612,"value":3328},"Remove record",{"type":606,"tag":3219,"props":3330,"children":3331},{},[3332,3337,3346],{"type":606,"tag":3246,"props":3333,"children":3334},{},[3335],{"type":612,"value":3336},"Join",{"type":606,"tag":3246,"props":3338,"children":3339},{},[3340],{"type":606,"tag":632,"props":3341,"children":3343},{"className":3342},[],[3344],{"type":612,"value":3345},"SELECT * FROM a JOIN b ON ...",{"type":606,"tag":3246,"props":3347,"children":3348},{},[3349],{"type":612,"value":3350},"Combine tables",{"type":606,"tag":3219,"props":3352,"children":3353},{},[3354,3359,3368],{"type":606,"tag":3246,"props":3355,"children":3356},{},[3357],{"type":612,"value":3358},"Filter",{"type":606,"tag":3246,"props":3360,"children":3361},{},[3362],{"type":606,"tag":632,"props":3363,"children":3365},{"className":3364},[],[3366],{"type":612,"value":3367},"WHERE condition",{"type":606,"tag":3246,"props":3369,"children":3370},{},[3371],{"type":612,"value":3372},"Filter results",{"type":606,"tag":3219,"props":3374,"children":3375},{},[3376,3381,3390],{"type":606,"tag":3246,"props":3377,"children":3378},{},[3379],{"type":612,"value":3380},"Sort",{"type":606,"tag":3246,"props":3382,"children":3383},{},[3384],{"type":606,"tag":632,"props":3385,"children":3387},{"className":3386},[],[3388],{"type":612,"value":3389},"ORDER BY column",{"type":606,"tag":3246,"props":3391,"children":3392},{},[3393],{"type":612,"value":3394},"Sort results",{"type":606,"tag":3219,"props":3396,"children":3397},{},[3398,3403,3412],{"type":606,"tag":3246,"props":3399,"children":3400},{},[3401],{"type":612,"value":3402},"Group",{"type":606,"tag":3246,"props":3404,"children":3405},{},[3406],{"type":606,"tag":632,"props":3407,"children":3409},{"className":3408},[],[3410],{"type":612,"value":3411},"GROUP BY column",{"type":606,"tag":3246,"props":3413,"children":3414},{},[3415],{"type":612,"value":3416},"Aggregate data",{"type":606,"tag":1173,"props":3418,"children":3420},{"id":3419},"database-operations",[3421],{"type":612,"value":3422},"🔧 Database Operations",{"type":606,"tag":1342,"props":3424,"children":3426},{"id":3425},"inserting-and-updating-data",[3427],{"type":612,"value":3428},"Inserting and Updating Data",{"type":606,"tag":621,"props":3430,"children":3431},{},[3432],{"type":606,"tag":625,"props":3433,"children":3435},{"className":627,"code":3434,"language":629,"meta":8,"style":8},"import sqlite3\n\nclass DatabaseManager:\n    def __init__(self, db_path='example.db'):\n        self.db_path = db_path\n    \n    def get_connection(self):\n        conn = sqlite3.connect(self.db_path)\n        conn.row_factory = sqlite3.Row\n        return conn\n    \n    def create_user(self, username, email):\n        \"\"\"Create a new user\"\"\"\n        conn = self.get_connection()\n        cursor = conn.cursor()\n        \n        try:\n            cursor.execute(\n                'INSERT INTO users (username, email) VALUES (?, ?)',\n                (username, email)\n            )\n            user_id = cursor.lastrowid\n            conn.commit()\n            print(f\"User created with ID: {user_id}\")\n            return user_id\n        except sqlite3.IntegrityError as e:\n            print(f\"Error creating user: {e}\")\n            return None\n        finally:\n            conn.close()\n    \n    def update_user_email(self, username, new_email):\n        \"\"\"Update user's email address\"\"\"\n        conn = self.get_connection()\n        cursor = conn.cursor()\n        \n        cursor.execute(\n            'UPDATE users SET email = ? WHERE username = ?',\n            (new_email, username)\n        )\n        \n        rows_affected = cursor.rowcount\n        conn.commit()\n        conn.close()\n        \n        if rows_affected > 0:\n            print(f\"Updated email for {username}\")\n            return True\n        else:\n            print(f\"User {username} not found\")\n            return False\n    \n    def create_post(self, title, content, username):\n        \"\"\"Create a new post\"\"\"\n        conn = self.get_connection()\n        cursor = conn.cursor()\n        \n        # First, get user ID\n        cursor.execute('SELECT id FROM users WHERE username = ?', (username,))\n        user_row = cursor.fetchone()\n        \n        if not user_row:\n            print(f\"User {username} not found\")\n            conn.close()\n            return None\n        \n        user_id = user_row['id']\n        \n        # Create post\n        cursor.execute(\n            'INSERT INTO posts (title, content, user_id) VALUES (?, ?, ?)',\n            (title, content, user_id)\n        )\n        \n        post_id = cursor.lastrowid\n        conn.commit()\n        conn.close()\n        \n        print(f\"Post created with ID: {post_id}\")\n        return post_id\n    \n    def delete_post(self, post_id):\n        \"\"\"Delete a post by ID\"\"\"\n        conn = self.get_connection()\n        cursor = conn.cursor()\n        \n        cursor.execute('DELETE FROM posts WHERE id = ?', (post_id,))\n        rows_affected = cursor.rowcount\n        conn.commit()\n        conn.close()\n        \n        if rows_affected > 0:\n            print(f\"Post {post_id} deleted\")\n            return True\n        else:\n            print(f\"Post {post_id} not found\")\n            return False\n\n# Test database manager\ndb = DatabaseManager()\n\n# Create new user\nnew_user_id = db.create_user('diana456', 'diana@example.com')\n\n# Update user email\ndb.update_user_email('diana456', 'diana.new@example.com')\n\n# Create post\nif new_user_id:\n    post_id = db.create_post('New User Post', 'This is my first post!', 'diana456')\n    \n    # Delete post\n    if post_id:\n        db.delete_post(post_id)\n",[3436],{"type":606,"tag":632,"props":3437,"children":3438},{"__ignoreMap":8},[3439,3450,3457,3475,3506,3528,3535,3552,3578,3594,3606,3613,3630,3638,3659,3675,3683,3695,3703,3716,3724,3732,3749,3757,3799,3812,3835,3876,3888,3900,3908,3915,3932,3940,3959,3974,3981,3989,4001,4009,4016,4023,4040,4048,4056,4063,4090,4131,4143,4155,4196,4208,4215,4232,4240,4259,4274,4281,4289,4306,4323,4330,4347,4386,4393,4404,4411,4437,4444,4452,4460,4473,4482,4490,4498,4515,4523,4531,4539,4582,4595,4603,4621,4630,4650,4666,4674,4692,4708,4716,4724,4732,4756,4798,4810,4822,4862,4874,4882,4891,4909,4917,4926,4962,4970,4979,5005,5013,5022,5036,5080,5088,5097,5111],{"type":606,"tag":636,"props":3440,"children":3441},{"class":638,"line":12},[3442,3446],{"type":606,"tag":636,"props":3443,"children":3444},{"style":642},[3445],{"type":612,"value":645},{"type":606,"tag":636,"props":3447,"children":3448},{"style":648},[3449],{"type":612,"value":651},{"type":606,"tag":636,"props":3451,"children":3452},{"class":638,"line":27},[3453],{"type":606,"tag":636,"props":3454,"children":3455},{"emptyLinePlaceholder":13},[3456],{"type":612,"value":659},{"type":606,"tag":636,"props":3458,"children":3459},{"class":638,"line":36},[3460,3465,3470],{"type":606,"tag":636,"props":3461,"children":3462},{"style":642},[3463],{"type":612,"value":3464},"class",{"type":606,"tag":636,"props":3466,"children":3467},{"style":1386},[3468],{"type":612,"value":3469}," DatabaseManager",{"type":606,"tag":636,"props":3471,"children":3472},{"style":648},[3473],{"type":612,"value":3474},":\n",{"type":606,"tag":636,"props":3476,"children":3477},{"class":638,"line":45},[3478,3483,3488,3493,3497,3501],{"type":606,"tag":636,"props":3479,"children":3480},{"style":642},[3481],{"type":612,"value":3482},"    def",{"type":606,"tag":636,"props":3484,"children":3485},{"style":865},[3486],{"type":612,"value":3487}," __init__",{"type":606,"tag":636,"props":3489,"children":3490},{"style":648},[3491],{"type":612,"value":3492},"(self, db_path",{"type":606,"tag":636,"props":3494,"children":3495},{"style":642},[3496],{"type":612,"value":681},{"type":606,"tag":636,"props":3498,"children":3499},{"style":689},[3500],{"type":612,"value":1423},{"type":606,"tag":636,"props":3502,"children":3503},{"style":648},[3504],{"type":612,"value":3505},"):\n",{"type":606,"tag":636,"props":3507,"children":3508},{"class":638,"line":54},[3509,3514,3519,3523],{"type":606,"tag":636,"props":3510,"children":3511},{"style":865},[3512],{"type":612,"value":3513},"        self",{"type":606,"tag":636,"props":3515,"children":3516},{"style":648},[3517],{"type":612,"value":3518},".db_path ",{"type":606,"tag":636,"props":3520,"children":3521},{"style":642},[3522],{"type":612,"value":681},{"type":606,"tag":636,"props":3524,"children":3525},{"style":648},[3526],{"type":612,"value":3527}," db_path\n",{"type":606,"tag":636,"props":3529,"children":3530},{"class":638,"line":63},[3531],{"type":606,"tag":636,"props":3532,"children":3533},{"style":648},[3534],{"type":612,"value":1451},{"type":606,"tag":636,"props":3536,"children":3537},{"class":638,"line":72},[3538,3542,3547],{"type":606,"tag":636,"props":3539,"children":3540},{"style":642},[3541],{"type":612,"value":3482},{"type":606,"tag":636,"props":3543,"children":3544},{"style":1386},[3545],{"type":612,"value":3546}," get_connection",{"type":606,"tag":636,"props":3548,"children":3549},{"style":648},[3550],{"type":612,"value":3551},"(self):\n",{"type":606,"tag":636,"props":3553,"children":3554},{"class":638,"line":81},[3555,3560,3564,3568,3573],{"type":606,"tag":636,"props":3556,"children":3557},{"style":648},[3558],{"type":612,"value":3559},"        conn ",{"type":606,"tag":636,"props":3561,"children":3562},{"style":642},[3563],{"type":612,"value":681},{"type":606,"tag":636,"props":3565,"children":3566},{"style":648},[3567],{"type":612,"value":686},{"type":606,"tag":636,"props":3569,"children":3570},{"style":865},[3571],{"type":612,"value":3572},"self",{"type":606,"tag":636,"props":3574,"children":3575},{"style":648},[3576],{"type":612,"value":3577},".db_path)\n",{"type":606,"tag":636,"props":3579,"children":3580},{"class":638,"line":745},[3581,3586,3590],{"type":606,"tag":636,"props":3582,"children":3583},{"style":648},[3584],{"type":612,"value":3585},"        conn.row_factory ",{"type":606,"tag":636,"props":3587,"children":3588},{"style":642},[3589],{"type":612,"value":681},{"type":606,"tag":636,"props":3591,"children":3592},{"style":648},[3593],{"type":612,"value":2223},{"type":606,"tag":636,"props":3595,"children":3596},{"class":638,"line":99},[3597,3602],{"type":606,"tag":636,"props":3598,"children":3599},{"style":642},[3600],{"type":612,"value":3601},"        return",{"type":606,"tag":636,"props":3603,"children":3604},{"style":648},[3605],{"type":612,"value":1658},{"type":606,"tag":636,"props":3607,"children":3608},{"class":638,"line":108},[3609],{"type":606,"tag":636,"props":3610,"children":3611},{"style":648},[3612],{"type":612,"value":1451},{"type":606,"tag":636,"props":3614,"children":3615},{"class":638,"line":117},[3616,3620,3625],{"type":606,"tag":636,"props":3617,"children":3618},{"style":642},[3619],{"type":612,"value":3482},{"type":606,"tag":636,"props":3621,"children":3622},{"style":1386},[3623],{"type":612,"value":3624}," create_user",{"type":606,"tag":636,"props":3626,"children":3627},{"style":648},[3628],{"type":612,"value":3629},"(self, username, email):\n",{"type":606,"tag":636,"props":3631,"children":3632},{"class":638,"line":126},[3633],{"type":606,"tag":636,"props":3634,"children":3635},{"style":689},[3636],{"type":612,"value":3637},"        \"\"\"Create a new user\"\"\"\n",{"type":606,"tag":636,"props":3639,"children":3640},{"class":638,"line":135},[3641,3645,3649,3654],{"type":606,"tag":636,"props":3642,"children":3643},{"style":648},[3644],{"type":612,"value":3559},{"type":606,"tag":636,"props":3646,"children":3647},{"style":642},[3648],{"type":612,"value":681},{"type":606,"tag":636,"props":3650,"children":3651},{"style":865},[3652],{"type":612,"value":3653}," self",{"type":606,"tag":636,"props":3655,"children":3656},{"style":648},[3657],{"type":612,"value":3658},".get_connection()\n",{"type":606,"tag":636,"props":3660,"children":3661},{"class":638,"line":144},[3662,3667,3671],{"type":606,"tag":636,"props":3663,"children":3664},{"style":648},[3665],{"type":612,"value":3666},"        cursor ",{"type":606,"tag":636,"props":3668,"children":3669},{"style":642},[3670],{"type":612,"value":681},{"type":606,"tag":636,"props":3672,"children":3673},{"style":648},[3674],{"type":612,"value":714},{"type":606,"tag":636,"props":3676,"children":3677},{"class":638,"line":153},[3678],{"type":606,"tag":636,"props":3679,"children":3680},{"style":648},[3681],{"type":612,"value":3682},"        \n",{"type":606,"tag":636,"props":3684,"children":3685},{"class":638,"line":163},[3686,3691],{"type":606,"tag":636,"props":3687,"children":3688},{"style":642},[3689],{"type":612,"value":3690},"        try",{"type":606,"tag":636,"props":3692,"children":3693},{"style":648},[3694],{"type":612,"value":3474},{"type":606,"tag":636,"props":3696,"children":3697},{"class":638,"line":172},[3698],{"type":606,"tag":636,"props":3699,"children":3700},{"style":648},[3701],{"type":612,"value":3702},"            cursor.execute(\n",{"type":606,"tag":636,"props":3704,"children":3705},{"class":638,"line":181},[3706,3711],{"type":606,"tag":636,"props":3707,"children":3708},{"style":689},[3709],{"type":612,"value":3710},"                'INSERT INTO users (username, email) VALUES (?, ?)'",{"type":606,"tag":636,"props":3712,"children":3713},{"style":648},[3714],{"type":612,"value":3715},",\n",{"type":606,"tag":636,"props":3717,"children":3718},{"class":638,"line":190},[3719],{"type":606,"tag":636,"props":3720,"children":3721},{"style":648},[3722],{"type":612,"value":3723},"                (username, email)\n",{"type":606,"tag":636,"props":3725,"children":3726},{"class":638,"line":199},[3727],{"type":606,"tag":636,"props":3728,"children":3729},{"style":648},[3730],{"type":612,"value":3731},"            )\n",{"type":606,"tag":636,"props":3733,"children":3734},{"class":638,"line":208},[3735,3740,3744],{"type":606,"tag":636,"props":3736,"children":3737},{"style":648},[3738],{"type":612,"value":3739},"            user_id ",{"type":606,"tag":636,"props":3741,"children":3742},{"style":642},[3743],{"type":612,"value":681},{"type":606,"tag":636,"props":3745,"children":3746},{"style":648},[3747],{"type":612,"value":3748}," cursor.lastrowid\n",{"type":606,"tag":636,"props":3750,"children":3751},{"class":638,"line":217},[3752],{"type":606,"tag":636,"props":3753,"children":3754},{"style":648},[3755],{"type":612,"value":3756},"            conn.commit()\n",{"type":606,"tag":636,"props":3758,"children":3759},{"class":638,"line":227},[3760,3765,3769,3773,3778,3782,3787,3791,3795],{"type":606,"tag":636,"props":3761,"children":3762},{"style":865},[3763],{"type":612,"value":3764},"            print",{"type":606,"tag":636,"props":3766,"children":3767},{"style":648},[3768],{"type":612,"value":1042},{"type":606,"tag":636,"props":3770,"children":3771},{"style":642},[3772],{"type":612,"value":1091},{"type":606,"tag":636,"props":3774,"children":3775},{"style":689},[3776],{"type":612,"value":3777},"\"User created with ID: ",{"type":606,"tag":636,"props":3779,"children":3780},{"style":865},[3781],{"type":612,"value":1101},{"type":606,"tag":636,"props":3783,"children":3784},{"style":648},[3785],{"type":612,"value":3786},"user_id",{"type":606,"tag":636,"props":3788,"children":3789},{"style":865},[3790],{"type":612,"value":1121},{"type":606,"tag":636,"props":3792,"children":3793},{"style":689},[3794],{"type":612,"value":2909},{"type":606,"tag":636,"props":3796,"children":3797},{"style":648},[3798],{"type":612,"value":697},{"type":606,"tag":636,"props":3800,"children":3801},{"class":638,"line":236},[3802,3807],{"type":606,"tag":636,"props":3803,"children":3804},{"style":642},[3805],{"type":612,"value":3806},"            return",{"type":606,"tag":636,"props":3808,"children":3809},{"style":648},[3810],{"type":612,"value":3811}," user_id\n",{"type":606,"tag":636,"props":3813,"children":3814},{"class":638,"line":245},[3815,3820,3825,3830],{"type":606,"tag":636,"props":3816,"children":3817},{"style":642},[3818],{"type":612,"value":3819},"        except",{"type":606,"tag":636,"props":3821,"children":3822},{"style":648},[3823],{"type":612,"value":3824}," sqlite3.IntegrityError ",{"type":606,"tag":636,"props":3826,"children":3827},{"style":642},[3828],{"type":612,"value":3829},"as",{"type":606,"tag":636,"props":3831,"children":3832},{"style":648},[3833],{"type":612,"value":3834}," e:\n",{"type":606,"tag":636,"props":3836,"children":3837},{"class":638,"line":254},[3838,3842,3846,3850,3855,3859,3864,3868,3872],{"type":606,"tag":636,"props":3839,"children":3840},{"style":865},[3841],{"type":612,"value":3764},{"type":606,"tag":636,"props":3843,"children":3844},{"style":648},[3845],{"type":612,"value":1042},{"type":606,"tag":636,"props":3847,"children":3848},{"style":642},[3849],{"type":612,"value":1091},{"type":606,"tag":636,"props":3851,"children":3852},{"style":689},[3853],{"type":612,"value":3854},"\"Error creating user: ",{"type":606,"tag":636,"props":3856,"children":3857},{"style":865},[3858],{"type":612,"value":1101},{"type":606,"tag":636,"props":3860,"children":3861},{"style":648},[3862],{"type":612,"value":3863},"e",{"type":606,"tag":636,"props":3865,"children":3866},{"style":865},[3867],{"type":612,"value":1121},{"type":606,"tag":636,"props":3869,"children":3870},{"style":689},[3871],{"type":612,"value":2909},{"type":606,"tag":636,"props":3873,"children":3874},{"style":648},[3875],{"type":612,"value":697},{"type":606,"tag":636,"props":3877,"children":3878},{"class":638,"line":263},[3879,3883],{"type":606,"tag":636,"props":3880,"children":3881},{"style":642},[3882],{"type":612,"value":3806},{"type":606,"tag":636,"props":3884,"children":3885},{"style":865},[3886],{"type":612,"value":3887}," None\n",{"type":606,"tag":636,"props":3889,"children":3890},{"class":638,"line":272},[3891,3896],{"type":606,"tag":636,"props":3892,"children":3893},{"style":642},[3894],{"type":612,"value":3895},"        finally",{"type":606,"tag":636,"props":3897,"children":3898},{"style":648},[3899],{"type":612,"value":3474},{"type":606,"tag":636,"props":3901,"children":3902},{"class":638,"line":281},[3903],{"type":606,"tag":636,"props":3904,"children":3905},{"style":648},[3906],{"type":612,"value":3907},"            conn.close()\n",{"type":606,"tag":636,"props":3909,"children":3910},{"class":638,"line":291},[3911],{"type":606,"tag":636,"props":3912,"children":3913},{"style":648},[3914],{"type":612,"value":1451},{"type":606,"tag":636,"props":3916,"children":3917},{"class":638,"line":302},[3918,3922,3927],{"type":606,"tag":636,"props":3919,"children":3920},{"style":642},[3921],{"type":612,"value":3482},{"type":606,"tag":636,"props":3923,"children":3924},{"style":1386},[3925],{"type":612,"value":3926}," update_user_email",{"type":606,"tag":636,"props":3928,"children":3929},{"style":648},[3930],{"type":612,"value":3931},"(self, username, new_email):\n",{"type":606,"tag":636,"props":3933,"children":3934},{"class":638,"line":311},[3935],{"type":606,"tag":636,"props":3936,"children":3937},{"style":689},[3938],{"type":612,"value":3939},"        \"\"\"Update user's email address\"\"\"\n",{"type":606,"tag":636,"props":3941,"children":3942},{"class":638,"line":320},[3943,3947,3951,3955],{"type":606,"tag":636,"props":3944,"children":3945},{"style":648},[3946],{"type":612,"value":3559},{"type":606,"tag":636,"props":3948,"children":3949},{"style":642},[3950],{"type":612,"value":681},{"type":606,"tag":636,"props":3952,"children":3953},{"style":865},[3954],{"type":612,"value":3653},{"type":606,"tag":636,"props":3956,"children":3957},{"style":648},[3958],{"type":612,"value":3658},{"type":606,"tag":636,"props":3960,"children":3961},{"class":638,"line":329},[3962,3966,3970],{"type":606,"tag":636,"props":3963,"children":3964},{"style":648},[3965],{"type":612,"value":3666},{"type":606,"tag":636,"props":3967,"children":3968},{"style":642},[3969],{"type":612,"value":681},{"type":606,"tag":636,"props":3971,"children":3972},{"style":648},[3973],{"type":612,"value":714},{"type":606,"tag":636,"props":3975,"children":3976},{"class":638,"line":338},[3977],{"type":606,"tag":636,"props":3978,"children":3979},{"style":648},[3980],{"type":612,"value":3682},{"type":606,"tag":636,"props":3982,"children":3983},{"class":638,"line":347},[3984],{"type":606,"tag":636,"props":3985,"children":3986},{"style":648},[3987],{"type":612,"value":3988},"        cursor.execute(\n",{"type":606,"tag":636,"props":3990,"children":3991},{"class":638,"line":356},[3992,3997],{"type":606,"tag":636,"props":3993,"children":3994},{"style":689},[3995],{"type":612,"value":3996},"            'UPDATE users SET email = ? WHERE username = ?'",{"type":606,"tag":636,"props":3998,"children":3999},{"style":648},[4000],{"type":612,"value":3715},{"type":606,"tag":636,"props":4002,"children":4003},{"class":638,"line":367},[4004],{"type":606,"tag":636,"props":4005,"children":4006},{"style":648},[4007],{"type":612,"value":4008},"            (new_email, username)\n",{"type":606,"tag":636,"props":4010,"children":4011},{"class":638,"line":376},[4012],{"type":606,"tag":636,"props":4013,"children":4014},{"style":648},[4015],{"type":612,"value":1519},{"type":606,"tag":636,"props":4017,"children":4018},{"class":638,"line":385},[4019],{"type":606,"tag":636,"props":4020,"children":4021},{"style":648},[4022],{"type":612,"value":3682},{"type":606,"tag":636,"props":4024,"children":4025},{"class":638,"line":394},[4026,4031,4035],{"type":606,"tag":636,"props":4027,"children":4028},{"style":648},[4029],{"type":612,"value":4030},"        rows_affected ",{"type":606,"tag":636,"props":4032,"children":4033},{"style":642},[4034],{"type":612,"value":681},{"type":606,"tag":636,"props":4036,"children":4037},{"style":648},[4038],{"type":612,"value":4039}," cursor.rowcount\n",{"type":606,"tag":636,"props":4041,"children":4042},{"class":638,"line":403},[4043],{"type":606,"tag":636,"props":4044,"children":4045},{"style":648},[4046],{"type":612,"value":4047},"        conn.commit()\n",{"type":606,"tag":636,"props":4049,"children":4050},{"class":638,"line":412},[4051],{"type":606,"tag":636,"props":4052,"children":4053},{"style":648},[4054],{"type":612,"value":4055},"        conn.close()\n",{"type":606,"tag":636,"props":4057,"children":4058},{"class":638,"line":423},[4059],{"type":606,"tag":636,"props":4060,"children":4061},{"style":648},[4062],{"type":612,"value":3682},{"type":606,"tag":636,"props":4064,"children":4065},{"class":638,"line":432},[4066,4071,4076,4081,4086],{"type":606,"tag":636,"props":4067,"children":4068},{"style":642},[4069],{"type":612,"value":4070},"        if",{"type":606,"tag":636,"props":4072,"children":4073},{"style":648},[4074],{"type":612,"value":4075}," rows_affected ",{"type":606,"tag":636,"props":4077,"children":4078},{"style":642},[4079],{"type":612,"value":4080},">",{"type":606,"tag":636,"props":4082,"children":4083},{"style":865},[4084],{"type":612,"value":4085}," 0",{"type":606,"tag":636,"props":4087,"children":4088},{"style":648},[4089],{"type":612,"value":3474},{"type":606,"tag":636,"props":4091,"children":4092},{"class":638,"line":441},[4093,4097,4101,4105,4110,4114,4119,4123,4127],{"type":606,"tag":636,"props":4094,"children":4095},{"style":865},[4096],{"type":612,"value":3764},{"type":606,"tag":636,"props":4098,"children":4099},{"style":648},[4100],{"type":612,"value":1042},{"type":606,"tag":636,"props":4102,"children":4103},{"style":642},[4104],{"type":612,"value":1091},{"type":606,"tag":636,"props":4106,"children":4107},{"style":689},[4108],{"type":612,"value":4109},"\"Updated email for ",{"type":606,"tag":636,"props":4111,"children":4112},{"style":865},[4113],{"type":612,"value":1101},{"type":606,"tag":636,"props":4115,"children":4116},{"style":648},[4117],{"type":612,"value":4118},"username",{"type":606,"tag":636,"props":4120,"children":4121},{"style":865},[4122],{"type":612,"value":1121},{"type":606,"tag":636,"props":4124,"children":4125},{"style":689},[4126],{"type":612,"value":2909},{"type":606,"tag":636,"props":4128,"children":4129},{"style":648},[4130],{"type":612,"value":697},{"type":606,"tag":636,"props":4132,"children":4133},{"class":638,"line":450},[4134,4138],{"type":606,"tag":636,"props":4135,"children":4136},{"style":642},[4137],{"type":612,"value":3806},{"type":606,"tag":636,"props":4139,"children":4140},{"style":865},[4141],{"type":612,"value":4142}," True\n",{"type":606,"tag":636,"props":4144,"children":4145},{"class":638,"line":459},[4146,4151],{"type":606,"tag":636,"props":4147,"children":4148},{"style":642},[4149],{"type":612,"value":4150},"        else",{"type":606,"tag":636,"props":4152,"children":4153},{"style":648},[4154],{"type":612,"value":3474},{"type":606,"tag":636,"props":4156,"children":4157},{"class":638,"line":468},[4158,4162,4166,4170,4175,4179,4183,4187,4192],{"type":606,"tag":636,"props":4159,"children":4160},{"style":865},[4161],{"type":612,"value":3764},{"type":606,"tag":636,"props":4163,"children":4164},{"style":648},[4165],{"type":612,"value":1042},{"type":606,"tag":636,"props":4167,"children":4168},{"style":642},[4169],{"type":612,"value":1091},{"type":606,"tag":636,"props":4171,"children":4172},{"style":689},[4173],{"type":612,"value":4174},"\"User ",{"type":606,"tag":636,"props":4176,"children":4177},{"style":865},[4178],{"type":612,"value":1101},{"type":606,"tag":636,"props":4180,"children":4181},{"style":648},[4182],{"type":612,"value":4118},{"type":606,"tag":636,"props":4184,"children":4185},{"style":865},[4186],{"type":612,"value":1121},{"type":606,"tag":636,"props":4188,"children":4189},{"style":689},[4190],{"type":612,"value":4191}," not found\"",{"type":606,"tag":636,"props":4193,"children":4194},{"style":648},[4195],{"type":612,"value":697},{"type":606,"tag":636,"props":4197,"children":4198},{"class":638,"line":477},[4199,4203],{"type":606,"tag":636,"props":4200,"children":4201},{"style":642},[4202],{"type":612,"value":3806},{"type":606,"tag":636,"props":4204,"children":4205},{"style":865},[4206],{"type":612,"value":4207}," False\n",{"type":606,"tag":636,"props":4209,"children":4210},{"class":638,"line":488},[4211],{"type":606,"tag":636,"props":4212,"children":4213},{"style":648},[4214],{"type":612,"value":1451},{"type":606,"tag":636,"props":4216,"children":4217},{"class":638,"line":497},[4218,4222,4227],{"type":606,"tag":636,"props":4219,"children":4220},{"style":642},[4221],{"type":612,"value":3482},{"type":606,"tag":636,"props":4223,"children":4224},{"style":1386},[4225],{"type":612,"value":4226}," create_post",{"type":606,"tag":636,"props":4228,"children":4229},{"style":648},[4230],{"type":612,"value":4231},"(self, title, content, username):\n",{"type":606,"tag":636,"props":4233,"children":4234},{"class":638,"line":506},[4235],{"type":606,"tag":636,"props":4236,"children":4237},{"style":689},[4238],{"type":612,"value":4239},"        \"\"\"Create a new post\"\"\"\n",{"type":606,"tag":636,"props":4241,"children":4242},{"class":638,"line":515},[4243,4247,4251,4255],{"type":606,"tag":636,"props":4244,"children":4245},{"style":648},[4246],{"type":612,"value":3559},{"type":606,"tag":636,"props":4248,"children":4249},{"style":642},[4250],{"type":612,"value":681},{"type":606,"tag":636,"props":4252,"children":4253},{"style":865},[4254],{"type":612,"value":3653},{"type":606,"tag":636,"props":4256,"children":4257},{"style":648},[4258],{"type":612,"value":3658},{"type":606,"tag":636,"props":4260,"children":4261},{"class":638,"line":524},[4262,4266,4270],{"type":606,"tag":636,"props":4263,"children":4264},{"style":648},[4265],{"type":612,"value":3666},{"type":606,"tag":636,"props":4267,"children":4268},{"style":642},[4269],{"type":612,"value":681},{"type":606,"tag":636,"props":4271,"children":4272},{"style":648},[4273],{"type":612,"value":714},{"type":606,"tag":636,"props":4275,"children":4276},{"class":638,"line":533},[4277],{"type":606,"tag":636,"props":4278,"children":4279},{"style":648},[4280],{"type":612,"value":3682},{"type":606,"tag":636,"props":4282,"children":4283},{"class":638,"line":544},[4284],{"type":606,"tag":636,"props":4285,"children":4286},{"style":665},[4287],{"type":612,"value":4288},"        # First, get user ID\n",{"type":606,"tag":636,"props":4290,"children":4291},{"class":638,"line":553},[4292,4297,4302],{"type":606,"tag":636,"props":4293,"children":4294},{"style":648},[4295],{"type":612,"value":4296},"        cursor.execute(",{"type":606,"tag":636,"props":4298,"children":4299},{"style":689},[4300],{"type":612,"value":4301},"'SELECT id FROM users WHERE username = ?'",{"type":606,"tag":636,"props":4303,"children":4304},{"style":648},[4305],{"type":612,"value":2493},{"type":606,"tag":636,"props":4307,"children":4308},{"class":638,"line":562},[4309,4314,4318],{"type":606,"tag":636,"props":4310,"children":4311},{"style":648},[4312],{"type":612,"value":4313},"        user_row ",{"type":606,"tag":636,"props":4315,"children":4316},{"style":642},[4317],{"type":612,"value":681},{"type":606,"tag":636,"props":4319,"children":4320},{"style":648},[4321],{"type":612,"value":4322}," cursor.fetchone()\n",{"type":606,"tag":636,"props":4324,"children":4325},{"class":638,"line":571},[4326],{"type":606,"tag":636,"props":4327,"children":4328},{"style":648},[4329],{"type":612,"value":3682},{"type":606,"tag":636,"props":4331,"children":4332},{"class":638,"line":580},[4333,4337,4342],{"type":606,"tag":636,"props":4334,"children":4335},{"style":642},[4336],{"type":612,"value":4070},{"type":606,"tag":636,"props":4338,"children":4339},{"style":642},[4340],{"type":612,"value":4341}," not",{"type":606,"tag":636,"props":4343,"children":4344},{"style":648},[4345],{"type":612,"value":4346}," user_row:\n",{"type":606,"tag":636,"props":4348,"children":4349},{"class":638,"line":589},[4350,4354,4358,4362,4366,4370,4374,4378,4382],{"type":606,"tag":636,"props":4351,"children":4352},{"style":865},[4353],{"type":612,"value":3764},{"type":606,"tag":636,"props":4355,"children":4356},{"style":648},[4357],{"type":612,"value":1042},{"type":606,"tag":636,"props":4359,"children":4360},{"style":642},[4361],{"type":612,"value":1091},{"type":606,"tag":636,"props":4363,"children":4364},{"style":689},[4365],{"type":612,"value":4174},{"type":606,"tag":636,"props":4367,"children":4368},{"style":865},[4369],{"type":612,"value":1101},{"type":606,"tag":636,"props":4371,"children":4372},{"style":648},[4373],{"type":612,"value":4118},{"type":606,"tag":636,"props":4375,"children":4376},{"style":865},[4377],{"type":612,"value":1121},{"type":606,"tag":636,"props":4379,"children":4380},{"style":689},[4381],{"type":612,"value":4191},{"type":606,"tag":636,"props":4383,"children":4384},{"style":648},[4385],{"type":612,"value":697},{"type":606,"tag":636,"props":4387,"children":4388},{"class":638,"line":2998},[4389],{"type":606,"tag":636,"props":4390,"children":4391},{"style":648},[4392],{"type":612,"value":3907},{"type":606,"tag":636,"props":4394,"children":4395},{"class":638,"line":3048},[4396,4400],{"type":606,"tag":636,"props":4397,"children":4398},{"style":642},[4399],{"type":612,"value":3806},{"type":606,"tag":636,"props":4401,"children":4402},{"style":865},[4403],{"type":612,"value":3887},{"type":606,"tag":636,"props":4405,"children":4406},{"class":638,"line":3056},[4407],{"type":606,"tag":636,"props":4408,"children":4409},{"style":648},[4410],{"type":612,"value":3682},{"type":606,"tag":636,"props":4412,"children":4413},{"class":638,"line":3085},[4414,4419,4423,4428,4433],{"type":606,"tag":636,"props":4415,"children":4416},{"style":648},[4417],{"type":612,"value":4418},"        user_id ",{"type":606,"tag":636,"props":4420,"children":4421},{"style":642},[4422],{"type":612,"value":681},{"type":606,"tag":636,"props":4424,"children":4425},{"style":648},[4426],{"type":612,"value":4427}," user_row[",{"type":606,"tag":636,"props":4429,"children":4430},{"style":689},[4431],{"type":612,"value":4432},"'id'",{"type":606,"tag":636,"props":4434,"children":4435},{"style":648},[4436],{"type":612,"value":949},{"type":606,"tag":636,"props":4438,"children":4439},{"class":638,"line":3112},[4440],{"type":606,"tag":636,"props":4441,"children":4442},{"style":648},[4443],{"type":612,"value":3682},{"type":606,"tag":636,"props":4445,"children":4446},{"class":638,"line":3133},[4447],{"type":606,"tag":636,"props":4448,"children":4449},{"style":665},[4450],{"type":612,"value":4451},"        # Create post\n",{"type":606,"tag":636,"props":4453,"children":4455},{"class":638,"line":4454},70,[4456],{"type":606,"tag":636,"props":4457,"children":4458},{"style":648},[4459],{"type":612,"value":3988},{"type":606,"tag":636,"props":4461,"children":4463},{"class":638,"line":4462},71,[4464,4469],{"type":606,"tag":636,"props":4465,"children":4466},{"style":689},[4467],{"type":612,"value":4468},"            'INSERT INTO posts (title, content, user_id) VALUES (?, ?, ?)'",{"type":606,"tag":636,"props":4470,"children":4471},{"style":648},[4472],{"type":612,"value":3715},{"type":606,"tag":636,"props":4474,"children":4476},{"class":638,"line":4475},72,[4477],{"type":606,"tag":636,"props":4478,"children":4479},{"style":648},[4480],{"type":612,"value":4481},"            (title, content, user_id)\n",{"type":606,"tag":636,"props":4483,"children":4485},{"class":638,"line":4484},73,[4486],{"type":606,"tag":636,"props":4487,"children":4488},{"style":648},[4489],{"type":612,"value":1519},{"type":606,"tag":636,"props":4491,"children":4493},{"class":638,"line":4492},74,[4494],{"type":606,"tag":636,"props":4495,"children":4496},{"style":648},[4497],{"type":612,"value":3682},{"type":606,"tag":636,"props":4499,"children":4501},{"class":638,"line":4500},75,[4502,4507,4511],{"type":606,"tag":636,"props":4503,"children":4504},{"style":648},[4505],{"type":612,"value":4506},"        post_id ",{"type":606,"tag":636,"props":4508,"children":4509},{"style":642},[4510],{"type":612,"value":681},{"type":606,"tag":636,"props":4512,"children":4513},{"style":648},[4514],{"type":612,"value":3748},{"type":606,"tag":636,"props":4516,"children":4518},{"class":638,"line":4517},76,[4519],{"type":606,"tag":636,"props":4520,"children":4521},{"style":648},[4522],{"type":612,"value":4047},{"type":606,"tag":636,"props":4524,"children":4526},{"class":638,"line":4525},77,[4527],{"type":606,"tag":636,"props":4528,"children":4529},{"style":648},[4530],{"type":612,"value":4055},{"type":606,"tag":636,"props":4532,"children":4534},{"class":638,"line":4533},78,[4535],{"type":606,"tag":636,"props":4536,"children":4537},{"style":648},[4538],{"type":612,"value":3682},{"type":606,"tag":636,"props":4540,"children":4542},{"class":638,"line":4541},79,[4543,4548,4552,4556,4561,4565,4570,4574,4578],{"type":606,"tag":636,"props":4544,"children":4545},{"style":865},[4546],{"type":612,"value":4547},"        print",{"type":606,"tag":636,"props":4549,"children":4550},{"style":648},[4551],{"type":612,"value":1042},{"type":606,"tag":636,"props":4553,"children":4554},{"style":642},[4555],{"type":612,"value":1091},{"type":606,"tag":636,"props":4557,"children":4558},{"style":689},[4559],{"type":612,"value":4560},"\"Post created with ID: ",{"type":606,"tag":636,"props":4562,"children":4563},{"style":865},[4564],{"type":612,"value":1101},{"type":606,"tag":636,"props":4566,"children":4567},{"style":648},[4568],{"type":612,"value":4569},"post_id",{"type":606,"tag":636,"props":4571,"children":4572},{"style":865},[4573],{"type":612,"value":1121},{"type":606,"tag":636,"props":4575,"children":4576},{"style":689},[4577],{"type":612,"value":2909},{"type":606,"tag":636,"props":4579,"children":4580},{"style":648},[4581],{"type":612,"value":697},{"type":606,"tag":636,"props":4583,"children":4585},{"class":638,"line":4584},80,[4586,4590],{"type":606,"tag":636,"props":4587,"children":4588},{"style":642},[4589],{"type":612,"value":3601},{"type":606,"tag":636,"props":4591,"children":4592},{"style":648},[4593],{"type":612,"value":4594}," post_id\n",{"type":606,"tag":636,"props":4596,"children":4598},{"class":638,"line":4597},81,[4599],{"type":606,"tag":636,"props":4600,"children":4601},{"style":648},[4602],{"type":612,"value":1451},{"type":606,"tag":636,"props":4604,"children":4606},{"class":638,"line":4605},82,[4607,4611,4616],{"type":606,"tag":636,"props":4608,"children":4609},{"style":642},[4610],{"type":612,"value":3482},{"type":606,"tag":636,"props":4612,"children":4613},{"style":1386},[4614],{"type":612,"value":4615}," delete_post",{"type":606,"tag":636,"props":4617,"children":4618},{"style":648},[4619],{"type":612,"value":4620},"(self, post_id):\n",{"type":606,"tag":636,"props":4622,"children":4624},{"class":638,"line":4623},83,[4625],{"type":606,"tag":636,"props":4626,"children":4627},{"style":689},[4628],{"type":612,"value":4629},"        \"\"\"Delete a post by ID\"\"\"\n",{"type":606,"tag":636,"props":4631,"children":4633},{"class":638,"line":4632},84,[4634,4638,4642,4646],{"type":606,"tag":636,"props":4635,"children":4636},{"style":648},[4637],{"type":612,"value":3559},{"type":606,"tag":636,"props":4639,"children":4640},{"style":642},[4641],{"type":612,"value":681},{"type":606,"tag":636,"props":4643,"children":4644},{"style":865},[4645],{"type":612,"value":3653},{"type":606,"tag":636,"props":4647,"children":4648},{"style":648},[4649],{"type":612,"value":3658},{"type":606,"tag":636,"props":4651,"children":4653},{"class":638,"line":4652},85,[4654,4658,4662],{"type":606,"tag":636,"props":4655,"children":4656},{"style":648},[4657],{"type":612,"value":3666},{"type":606,"tag":636,"props":4659,"children":4660},{"style":642},[4661],{"type":612,"value":681},{"type":606,"tag":636,"props":4663,"children":4664},{"style":648},[4665],{"type":612,"value":714},{"type":606,"tag":636,"props":4667,"children":4669},{"class":638,"line":4668},86,[4670],{"type":606,"tag":636,"props":4671,"children":4672},{"style":648},[4673],{"type":612,"value":3682},{"type":606,"tag":636,"props":4675,"children":4677},{"class":638,"line":4676},87,[4678,4682,4687],{"type":606,"tag":636,"props":4679,"children":4680},{"style":648},[4681],{"type":612,"value":4296},{"type":606,"tag":636,"props":4683,"children":4684},{"style":689},[4685],{"type":612,"value":4686},"'DELETE FROM posts WHERE id = ?'",{"type":606,"tag":636,"props":4688,"children":4689},{"style":648},[4690],{"type":612,"value":4691},", (post_id,))\n",{"type":606,"tag":636,"props":4693,"children":4695},{"class":638,"line":4694},88,[4696,4700,4704],{"type":606,"tag":636,"props":4697,"children":4698},{"style":648},[4699],{"type":612,"value":4030},{"type":606,"tag":636,"props":4701,"children":4702},{"style":642},[4703],{"type":612,"value":681},{"type":606,"tag":636,"props":4705,"children":4706},{"style":648},[4707],{"type":612,"value":4039},{"type":606,"tag":636,"props":4709,"children":4711},{"class":638,"line":4710},89,[4712],{"type":606,"tag":636,"props":4713,"children":4714},{"style":648},[4715],{"type":612,"value":4047},{"type":606,"tag":636,"props":4717,"children":4719},{"class":638,"line":4718},90,[4720],{"type":606,"tag":636,"props":4721,"children":4722},{"style":648},[4723],{"type":612,"value":4055},{"type":606,"tag":636,"props":4725,"children":4727},{"class":638,"line":4726},91,[4728],{"type":606,"tag":636,"props":4729,"children":4730},{"style":648},[4731],{"type":612,"value":3682},{"type":606,"tag":636,"props":4733,"children":4735},{"class":638,"line":4734},92,[4736,4740,4744,4748,4752],{"type":606,"tag":636,"props":4737,"children":4738},{"style":642},[4739],{"type":612,"value":4070},{"type":606,"tag":636,"props":4741,"children":4742},{"style":648},[4743],{"type":612,"value":4075},{"type":606,"tag":636,"props":4745,"children":4746},{"style":642},[4747],{"type":612,"value":4080},{"type":606,"tag":636,"props":4749,"children":4750},{"style":865},[4751],{"type":612,"value":4085},{"type":606,"tag":636,"props":4753,"children":4754},{"style":648},[4755],{"type":612,"value":3474},{"type":606,"tag":636,"props":4757,"children":4759},{"class":638,"line":4758},93,[4760,4764,4768,4772,4777,4781,4785,4789,4794],{"type":606,"tag":636,"props":4761,"children":4762},{"style":865},[4763],{"type":612,"value":3764},{"type":606,"tag":636,"props":4765,"children":4766},{"style":648},[4767],{"type":612,"value":1042},{"type":606,"tag":636,"props":4769,"children":4770},{"style":642},[4771],{"type":612,"value":1091},{"type":606,"tag":636,"props":4773,"children":4774},{"style":689},[4775],{"type":612,"value":4776},"\"Post ",{"type":606,"tag":636,"props":4778,"children":4779},{"style":865},[4780],{"type":612,"value":1101},{"type":606,"tag":636,"props":4782,"children":4783},{"style":648},[4784],{"type":612,"value":4569},{"type":606,"tag":636,"props":4786,"children":4787},{"style":865},[4788],{"type":612,"value":1121},{"type":606,"tag":636,"props":4790,"children":4791},{"style":689},[4792],{"type":612,"value":4793}," deleted\"",{"type":606,"tag":636,"props":4795,"children":4796},{"style":648},[4797],{"type":612,"value":697},{"type":606,"tag":636,"props":4799,"children":4801},{"class":638,"line":4800},94,[4802,4806],{"type":606,"tag":636,"props":4803,"children":4804},{"style":642},[4805],{"type":612,"value":3806},{"type":606,"tag":636,"props":4807,"children":4808},{"style":865},[4809],{"type":612,"value":4142},{"type":606,"tag":636,"props":4811,"children":4813},{"class":638,"line":4812},95,[4814,4818],{"type":606,"tag":636,"props":4815,"children":4816},{"style":642},[4817],{"type":612,"value":4150},{"type":606,"tag":636,"props":4819,"children":4820},{"style":648},[4821],{"type":612,"value":3474},{"type":606,"tag":636,"props":4823,"children":4825},{"class":638,"line":4824},96,[4826,4830,4834,4838,4842,4846,4850,4854,4858],{"type":606,"tag":636,"props":4827,"children":4828},{"style":865},[4829],{"type":612,"value":3764},{"type":606,"tag":636,"props":4831,"children":4832},{"style":648},[4833],{"type":612,"value":1042},{"type":606,"tag":636,"props":4835,"children":4836},{"style":642},[4837],{"type":612,"value":1091},{"type":606,"tag":636,"props":4839,"children":4840},{"style":689},[4841],{"type":612,"value":4776},{"type":606,"tag":636,"props":4843,"children":4844},{"style":865},[4845],{"type":612,"value":1101},{"type":606,"tag":636,"props":4847,"children":4848},{"style":648},[4849],{"type":612,"value":4569},{"type":606,"tag":636,"props":4851,"children":4852},{"style":865},[4853],{"type":612,"value":1121},{"type":606,"tag":636,"props":4855,"children":4856},{"style":689},[4857],{"type":612,"value":4191},{"type":606,"tag":636,"props":4859,"children":4860},{"style":648},[4861],{"type":612,"value":697},{"type":606,"tag":636,"props":4863,"children":4865},{"class":638,"line":4864},97,[4866,4870],{"type":606,"tag":636,"props":4867,"children":4868},{"style":642},[4869],{"type":612,"value":3806},{"type":606,"tag":636,"props":4871,"children":4872},{"style":865},[4873],{"type":612,"value":4207},{"type":606,"tag":636,"props":4875,"children":4877},{"class":638,"line":4876},98,[4878],{"type":606,"tag":636,"props":4879,"children":4880},{"emptyLinePlaceholder":13},[4881],{"type":612,"value":659},{"type":606,"tag":636,"props":4883,"children":4885},{"class":638,"line":4884},99,[4886],{"type":606,"tag":636,"props":4887,"children":4888},{"style":665},[4889],{"type":612,"value":4890},"# Test database manager\n",{"type":606,"tag":636,"props":4892,"children":4894},{"class":638,"line":4893},100,[4895,4900,4904],{"type":606,"tag":636,"props":4896,"children":4897},{"style":648},[4898],{"type":612,"value":4899},"db ",{"type":606,"tag":636,"props":4901,"children":4902},{"style":642},[4903],{"type":612,"value":681},{"type":606,"tag":636,"props":4905,"children":4906},{"style":648},[4907],{"type":612,"value":4908}," DatabaseManager()\n",{"type":606,"tag":636,"props":4910,"children":4912},{"class":638,"line":4911},101,[4913],{"type":606,"tag":636,"props":4914,"children":4915},{"emptyLinePlaceholder":13},[4916],{"type":612,"value":659},{"type":606,"tag":636,"props":4918,"children":4920},{"class":638,"line":4919},102,[4921],{"type":606,"tag":636,"props":4922,"children":4923},{"style":665},[4924],{"type":612,"value":4925},"# Create new user\n",{"type":606,"tag":636,"props":4927,"children":4929},{"class":638,"line":4928},103,[4930,4935,4939,4944,4949,4953,4958],{"type":606,"tag":636,"props":4931,"children":4932},{"style":648},[4933],{"type":612,"value":4934},"new_user_id ",{"type":606,"tag":636,"props":4936,"children":4937},{"style":642},[4938],{"type":612,"value":681},{"type":606,"tag":636,"props":4940,"children":4941},{"style":648},[4942],{"type":612,"value":4943}," db.create_user(",{"type":606,"tag":636,"props":4945,"children":4946},{"style":689},[4947],{"type":612,"value":4948},"'diana456'",{"type":606,"tag":636,"props":4950,"children":4951},{"style":648},[4952],{"type":612,"value":853},{"type":606,"tag":636,"props":4954,"children":4955},{"style":689},[4956],{"type":612,"value":4957},"'diana@example.com'",{"type":606,"tag":636,"props":4959,"children":4960},{"style":648},[4961],{"type":612,"value":697},{"type":606,"tag":636,"props":4963,"children":4965},{"class":638,"line":4964},104,[4966],{"type":606,"tag":636,"props":4967,"children":4968},{"emptyLinePlaceholder":13},[4969],{"type":612,"value":659},{"type":606,"tag":636,"props":4971,"children":4973},{"class":638,"line":4972},105,[4974],{"type":606,"tag":636,"props":4975,"children":4976},{"style":665},[4977],{"type":612,"value":4978},"# Update user email\n",{"type":606,"tag":636,"props":4980,"children":4982},{"class":638,"line":4981},106,[4983,4988,4992,4996,5001],{"type":606,"tag":636,"props":4984,"children":4985},{"style":648},[4986],{"type":612,"value":4987},"db.update_user_email(",{"type":606,"tag":636,"props":4989,"children":4990},{"style":689},[4991],{"type":612,"value":4948},{"type":606,"tag":636,"props":4993,"children":4994},{"style":648},[4995],{"type":612,"value":853},{"type":606,"tag":636,"props":4997,"children":4998},{"style":689},[4999],{"type":612,"value":5000},"'diana.new@example.com'",{"type":606,"tag":636,"props":5002,"children":5003},{"style":648},[5004],{"type":612,"value":697},{"type":606,"tag":636,"props":5006,"children":5008},{"class":638,"line":5007},107,[5009],{"type":606,"tag":636,"props":5010,"children":5011},{"emptyLinePlaceholder":13},[5012],{"type":612,"value":659},{"type":606,"tag":636,"props":5014,"children":5016},{"class":638,"line":5015},108,[5017],{"type":606,"tag":636,"props":5018,"children":5019},{"style":665},[5020],{"type":612,"value":5021},"# Create post\n",{"type":606,"tag":636,"props":5023,"children":5025},{"class":638,"line":5024},109,[5026,5031],{"type":606,"tag":636,"props":5027,"children":5028},{"style":642},[5029],{"type":612,"value":5030},"if",{"type":606,"tag":636,"props":5032,"children":5033},{"style":648},[5034],{"type":612,"value":5035}," new_user_id:\n",{"type":606,"tag":636,"props":5037,"children":5039},{"class":638,"line":5038},110,[5040,5045,5049,5054,5059,5063,5068,5072,5076],{"type":606,"tag":636,"props":5041,"children":5042},{"style":648},[5043],{"type":612,"value":5044},"    post_id ",{"type":606,"tag":636,"props":5046,"children":5047},{"style":642},[5048],{"type":612,"value":681},{"type":606,"tag":636,"props":5050,"children":5051},{"style":648},[5052],{"type":612,"value":5053}," db.create_post(",{"type":606,"tag":636,"props":5055,"children":5056},{"style":689},[5057],{"type":612,"value":5058},"'New User Post'",{"type":606,"tag":636,"props":5060,"children":5061},{"style":648},[5062],{"type":612,"value":853},{"type":606,"tag":636,"props":5064,"children":5065},{"style":689},[5066],{"type":612,"value":5067},"'This is my first post!'",{"type":606,"tag":636,"props":5069,"children":5070},{"style":648},[5071],{"type":612,"value":853},{"type":606,"tag":636,"props":5073,"children":5074},{"style":689},[5075],{"type":612,"value":4948},{"type":606,"tag":636,"props":5077,"children":5078},{"style":648},[5079],{"type":612,"value":697},{"type":606,"tag":636,"props":5081,"children":5083},{"class":638,"line":5082},111,[5084],{"type":606,"tag":636,"props":5085,"children":5086},{"style":648},[5087],{"type":612,"value":1451},{"type":606,"tag":636,"props":5089,"children":5091},{"class":638,"line":5090},112,[5092],{"type":606,"tag":636,"props":5093,"children":5094},{"style":665},[5095],{"type":612,"value":5096},"    # Delete post\n",{"type":606,"tag":636,"props":5098,"children":5100},{"class":638,"line":5099},113,[5101,5106],{"type":606,"tag":636,"props":5102,"children":5103},{"style":642},[5104],{"type":612,"value":5105},"    if",{"type":606,"tag":636,"props":5107,"children":5108},{"style":648},[5109],{"type":612,"value":5110}," post_id:\n",{"type":606,"tag":636,"props":5112,"children":5114},{"class":638,"line":5113},114,[5115],{"type":606,"tag":636,"props":5116,"children":5117},{"style":648},[5118],{"type":612,"value":5119},"        db.delete_post(post_id)\n",{"type":606,"tag":1342,"props":5121,"children":5123},{"id":5122},"data-analysis-and-aggregation",[5124],{"type":612,"value":5125},"Data Analysis and Aggregation",{"type":606,"tag":621,"props":5127,"children":5128},{},[5129],{"type":606,"tag":625,"props":5130,"children":5132},{"className":627,"code":5131,"language":629,"meta":8,"style":8},"import sqlite3\n\ndef get_user_statistics():\n    \"\"\"Get statistics about users and posts\"\"\"\n    conn = sqlite3.connect('example.db')\n    cursor = conn.cursor()\n    \n    # Count total users\n    cursor.execute('SELECT COUNT(*) FROM users')\n    total_users = cursor.fetchone()[0]\n    \n    # Count total posts\n    cursor.execute('SELECT COUNT(*) FROM posts')\n    total_posts = cursor.fetchone()[0]\n    \n    # Get posts per user\n    cursor.execute('''\n        SELECT u.username, COUNT(p.id) as post_count\n        FROM users u\n        LEFT JOIN posts p ON u.id = p.user_id\n        GROUP BY u.id, u.username\n        ORDER BY post_count DESC\n    ''')\n    user_post_counts = cursor.fetchall()\n    \n    # Get most recent posts\n    cursor.execute('''\n        SELECT p.title, u.username, p.created_date\n        FROM posts p\n        JOIN users u ON p.user_id = u.id\n        ORDER BY p.created_date DESC\n        LIMIT 3\n    ''')\n    recent_posts = cursor.fetchall()\n    \n    conn.close()\n    \n    return {\n        'total_users': total_users,\n        'total_posts': total_posts,\n        'user_post_counts': user_post_counts,\n        'recent_posts': recent_posts\n    }\n\ndef search_database(search_term):\n    \"\"\"Search across users and posts\"\"\"\n    conn = sqlite3.connect('example.db')\n    conn.row_factory = sqlite3.Row\n    cursor = conn.cursor()\n    \n    # Search in usernames and emails\n    cursor.execute('''\n        SELECT 'user' as type, username as title, email as content\n        FROM users\n        WHERE username LIKE ? OR email LIKE ?\n    ''', (f'%{search_term}%', f'%{search_term}%'))\n    \n    user_results = cursor.fetchall()\n    \n    # Search in post titles and content\n    cursor.execute('''\n        SELECT 'post' as type, p.title, p.content, u.username as author\n        FROM posts p\n        JOIN users u ON p.user_id = u.id\n        WHERE p.title LIKE ? OR p.content LIKE ?\n    ''', (f'%{search_term}%', f'%{search_term}%'))\n    \n    post_results = cursor.fetchall()\n    \n    conn.close()\n    \n    return {\n        'users': user_results,\n        'posts': post_results\n    }\n\n# Get statistics\nstats = get_user_statistics()\nprint(f\"Database Statistics:\")\nprint(f\"  Total users: {stats['total_users']}\")\nprint(f\"  Total posts: {stats['total_posts']}\")\n\nprint(\"\\nPosts per user:\")\nfor username, count in stats['user_post_counts']:\n    print(f\"  {username}: {count} posts\")\n\nprint(\"\\nRecent posts:\")\nfor title, username, date in stats['recent_posts']:\n    print(f\"  '{title}' by {username}\")\n\n# Search database\nsearch_results = search_database('Python')\nprint(f\"\\nSearch results for 'Python':\")\n\nif search_results['users']:\n    print(\"Users:\")\n    for user in search_results['users']:\n        print(f\"  {user['title']} - {user['content']}\")\n\nif search_results['posts']:\n    print(\"Posts:\")\n    for post in search_results['posts']:\n        print(f\"  '{post['title']}' by {post['author']}\")\n",[5133],{"type":606,"tag":632,"props":5134,"children":5135},{"__ignoreMap":8},[5136,5147,5154,5170,5178,5201,5216,5223,5231,5247,5273,5280,5288,5304,5328,5335,5343,5354,5362,5370,5378,5386,5394,5405,5421,5428,5436,5447,5455,5462,5469,5476,5484,5495,5511,5518,5525,5532,5544,5557,5570,5583,5596,5604,5611,5628,5636,5659,5674,5689,5696,5704,5715,5723,5731,5739,5807,5814,5830,5837,5845,5856,5864,5871,5878,5885,5952,5959,5975,5982,5989,5996,6007,6020,6033,6040,6047,6055,6072,6096,6146,6195,6202,6230,6261,6319,6326,6354,6383,6441,6448,6456,6481,6513,6520,6541,6561,6589,6661,6668,6688,6708,6735],{"type":606,"tag":636,"props":5137,"children":5138},{"class":638,"line":12},[5139,5143],{"type":606,"tag":636,"props":5140,"children":5141},{"style":642},[5142],{"type":612,"value":645},{"type":606,"tag":636,"props":5144,"children":5145},{"style":648},[5146],{"type":612,"value":651},{"type":606,"tag":636,"props":5148,"children":5149},{"class":638,"line":27},[5150],{"type":606,"tag":636,"props":5151,"children":5152},{"emptyLinePlaceholder":13},[5153],{"type":612,"value":659},{"type":606,"tag":636,"props":5155,"children":5156},{"class":638,"line":36},[5157,5161,5166],{"type":606,"tag":636,"props":5158,"children":5159},{"style":642},[5160],{"type":612,"value":1383},{"type":606,"tag":636,"props":5162,"children":5163},{"style":1386},[5164],{"type":612,"value":5165}," get_user_statistics",{"type":606,"tag":636,"props":5167,"children":5168},{"style":648},[5169],{"type":612,"value":1394},{"type":606,"tag":636,"props":5171,"children":5172},{"class":638,"line":45},[5173],{"type":606,"tag":636,"props":5174,"children":5175},{"style":689},[5176],{"type":612,"value":5177},"    \"\"\"Get statistics about users and posts\"\"\"\n",{"type":606,"tag":636,"props":5179,"children":5180},{"class":638,"line":54},[5181,5185,5189,5193,5197],{"type":606,"tag":636,"props":5182,"children":5183},{"style":648},[5184],{"type":612,"value":1410},{"type":606,"tag":636,"props":5186,"children":5187},{"style":642},[5188],{"type":612,"value":681},{"type":606,"tag":636,"props":5190,"children":5191},{"style":648},[5192],{"type":612,"value":686},{"type":606,"tag":636,"props":5194,"children":5195},{"style":689},[5196],{"type":612,"value":1423},{"type":606,"tag":636,"props":5198,"children":5199},{"style":648},[5200],{"type":612,"value":697},{"type":606,"tag":636,"props":5202,"children":5203},{"class":638,"line":63},[5204,5208,5212],{"type":606,"tag":636,"props":5205,"children":5206},{"style":648},[5207],{"type":612,"value":1435},{"type":606,"tag":636,"props":5209,"children":5210},{"style":642},[5211],{"type":612,"value":681},{"type":606,"tag":636,"props":5213,"children":5214},{"style":648},[5215],{"type":612,"value":714},{"type":606,"tag":636,"props":5217,"children":5218},{"class":638,"line":72},[5219],{"type":606,"tag":636,"props":5220,"children":5221},{"style":648},[5222],{"type":612,"value":1451},{"type":606,"tag":636,"props":5224,"children":5225},{"class":638,"line":81},[5226],{"type":606,"tag":636,"props":5227,"children":5228},{"style":665},[5229],{"type":612,"value":5230},"    # Count total users\n",{"type":606,"tag":636,"props":5232,"children":5233},{"class":638,"line":745},[5234,5238,5243],{"type":606,"tag":636,"props":5235,"children":5236},{"style":648},[5237],{"type":612,"value":1467},{"type":606,"tag":636,"props":5239,"children":5240},{"style":689},[5241],{"type":612,"value":5242},"'SELECT COUNT(*) FROM users'",{"type":606,"tag":636,"props":5244,"children":5245},{"style":648},[5246],{"type":612,"value":697},{"type":606,"tag":636,"props":5248,"children":5249},{"class":638,"line":99},[5250,5255,5259,5264,5269],{"type":606,"tag":636,"props":5251,"children":5252},{"style":648},[5253],{"type":612,"value":5254},"    total_users ",{"type":606,"tag":636,"props":5256,"children":5257},{"style":642},[5258],{"type":612,"value":681},{"type":606,"tag":636,"props":5260,"children":5261},{"style":648},[5262],{"type":612,"value":5263}," cursor.fetchone()[",{"type":606,"tag":636,"props":5265,"children":5266},{"style":865},[5267],{"type":612,"value":5268},"0",{"type":606,"tag":636,"props":5270,"children":5271},{"style":648},[5272],{"type":612,"value":949},{"type":606,"tag":636,"props":5274,"children":5275},{"class":638,"line":108},[5276],{"type":606,"tag":636,"props":5277,"children":5278},{"style":648},[5279],{"type":612,"value":1451},{"type":606,"tag":636,"props":5281,"children":5282},{"class":638,"line":117},[5283],{"type":606,"tag":636,"props":5284,"children":5285},{"style":665},[5286],{"type":612,"value":5287},"    # Count total posts\n",{"type":606,"tag":636,"props":5289,"children":5290},{"class":638,"line":126},[5291,5295,5300],{"type":606,"tag":636,"props":5292,"children":5293},{"style":648},[5294],{"type":612,"value":1467},{"type":606,"tag":636,"props":5296,"children":5297},{"style":689},[5298],{"type":612,"value":5299},"'SELECT COUNT(*) FROM posts'",{"type":606,"tag":636,"props":5301,"children":5302},{"style":648},[5303],{"type":612,"value":697},{"type":606,"tag":636,"props":5305,"children":5306},{"class":638,"line":135},[5307,5312,5316,5320,5324],{"type":606,"tag":636,"props":5308,"children":5309},{"style":648},[5310],{"type":612,"value":5311},"    total_posts ",{"type":606,"tag":636,"props":5313,"children":5314},{"style":642},[5315],{"type":612,"value":681},{"type":606,"tag":636,"props":5317,"children":5318},{"style":648},[5319],{"type":612,"value":5263},{"type":606,"tag":636,"props":5321,"children":5322},{"style":865},[5323],{"type":612,"value":5268},{"type":606,"tag":636,"props":5325,"children":5326},{"style":648},[5327],{"type":612,"value":949},{"type":606,"tag":636,"props":5329,"children":5330},{"class":638,"line":144},[5331],{"type":606,"tag":636,"props":5332,"children":5333},{"style":648},[5334],{"type":612,"value":1451},{"type":606,"tag":636,"props":5336,"children":5337},{"class":638,"line":153},[5338],{"type":606,"tag":636,"props":5339,"children":5340},{"style":665},[5341],{"type":612,"value":5342},"    # Get posts per user\n",{"type":606,"tag":636,"props":5344,"children":5345},{"class":638,"line":163},[5346,5350],{"type":606,"tag":636,"props":5347,"children":5348},{"style":648},[5349],{"type":612,"value":1467},{"type":606,"tag":636,"props":5351,"children":5352},{"style":689},[5353],{"type":612,"value":742},{"type":606,"tag":636,"props":5355,"children":5356},{"class":638,"line":172},[5357],{"type":606,"tag":636,"props":5358,"children":5359},{"style":689},[5360],{"type":612,"value":5361},"        SELECT u.username, COUNT(p.id) as post_count\n",{"type":606,"tag":636,"props":5363,"children":5364},{"class":638,"line":181},[5365],{"type":606,"tag":636,"props":5366,"children":5367},{"style":689},[5368],{"type":612,"value":5369},"        FROM users u\n",{"type":606,"tag":636,"props":5371,"children":5372},{"class":638,"line":190},[5373],{"type":606,"tag":636,"props":5374,"children":5375},{"style":689},[5376],{"type":612,"value":5377},"        LEFT JOIN posts p ON u.id = p.user_id\n",{"type":606,"tag":636,"props":5379,"children":5380},{"class":638,"line":199},[5381],{"type":606,"tag":636,"props":5382,"children":5383},{"style":689},[5384],{"type":612,"value":5385},"        GROUP BY u.id, u.username\n",{"type":606,"tag":636,"props":5387,"children":5388},{"class":638,"line":208},[5389],{"type":606,"tag":636,"props":5390,"children":5391},{"style":689},[5392],{"type":612,"value":5393},"        ORDER BY post_count DESC\n",{"type":606,"tag":636,"props":5395,"children":5396},{"class":638,"line":217},[5397,5401],{"type":606,"tag":636,"props":5398,"children":5399},{"style":689},[5400],{"type":612,"value":1527},{"type":606,"tag":636,"props":5402,"children":5403},{"style":648},[5404],{"type":612,"value":697},{"type":606,"tag":636,"props":5406,"children":5407},{"class":638,"line":227},[5408,5413,5417],{"type":606,"tag":636,"props":5409,"children":5410},{"style":648},[5411],{"type":612,"value":5412},"    user_post_counts ",{"type":606,"tag":636,"props":5414,"children":5415},{"style":642},[5416],{"type":612,"value":681},{"type":606,"tag":636,"props":5418,"children":5419},{"style":648},[5420],{"type":612,"value":1022},{"type":606,"tag":636,"props":5422,"children":5423},{"class":638,"line":236},[5424],{"type":606,"tag":636,"props":5425,"children":5426},{"style":648},[5427],{"type":612,"value":1451},{"type":606,"tag":636,"props":5429,"children":5430},{"class":638,"line":245},[5431],{"type":606,"tag":636,"props":5432,"children":5433},{"style":665},[5434],{"type":612,"value":5435},"    # Get most recent posts\n",{"type":606,"tag":636,"props":5437,"children":5438},{"class":638,"line":254},[5439,5443],{"type":606,"tag":636,"props":5440,"children":5441},{"style":648},[5442],{"type":612,"value":1467},{"type":606,"tag":636,"props":5444,"children":5445},{"style":689},[5446],{"type":612,"value":742},{"type":606,"tag":636,"props":5448,"children":5449},{"class":638,"line":263},[5450],{"type":606,"tag":636,"props":5451,"children":5452},{"style":689},[5453],{"type":612,"value":5454},"        SELECT p.title, u.username, p.created_date\n",{"type":606,"tag":636,"props":5456,"children":5457},{"class":638,"line":272},[5458],{"type":606,"tag":636,"props":5459,"children":5460},{"style":689},[5461],{"type":612,"value":2457},{"type":606,"tag":636,"props":5463,"children":5464},{"class":638,"line":281},[5465],{"type":606,"tag":636,"props":5466,"children":5467},{"style":689},[5468],{"type":612,"value":2465},{"type":606,"tag":636,"props":5470,"children":5471},{"class":638,"line":291},[5472],{"type":606,"tag":636,"props":5473,"children":5474},{"style":689},[5475],{"type":612,"value":2481},{"type":606,"tag":636,"props":5477,"children":5478},{"class":638,"line":302},[5479],{"type":606,"tag":636,"props":5480,"children":5481},{"style":689},[5482],{"type":612,"value":5483},"        LIMIT 3\n",{"type":606,"tag":636,"props":5485,"children":5486},{"class":638,"line":311},[5487,5491],{"type":606,"tag":636,"props":5488,"children":5489},{"style":689},[5490],{"type":612,"value":1527},{"type":606,"tag":636,"props":5492,"children":5493},{"style":648},[5494],{"type":612,"value":697},{"type":606,"tag":636,"props":5496,"children":5497},{"class":638,"line":320},[5498,5503,5507],{"type":606,"tag":636,"props":5499,"children":5500},{"style":648},[5501],{"type":612,"value":5502},"    recent_posts ",{"type":606,"tag":636,"props":5504,"children":5505},{"style":642},[5506],{"type":612,"value":681},{"type":606,"tag":636,"props":5508,"children":5509},{"style":648},[5510],{"type":612,"value":1022},{"type":606,"tag":636,"props":5512,"children":5513},{"class":638,"line":329},[5514],{"type":606,"tag":636,"props":5515,"children":5516},{"style":648},[5517],{"type":612,"value":1451},{"type":606,"tag":636,"props":5519,"children":5520},{"class":638,"line":338},[5521],{"type":606,"tag":636,"props":5522,"children":5523},{"style":648},[5524],{"type":612,"value":2349},{"type":606,"tag":636,"props":5526,"children":5527},{"class":638,"line":347},[5528],{"type":606,"tag":636,"props":5529,"children":5530},{"style":648},[5531],{"type":612,"value":1451},{"type":606,"tag":636,"props":5533,"children":5534},{"class":638,"line":356},[5535,5539],{"type":606,"tag":636,"props":5536,"children":5537},{"style":642},[5538],{"type":612,"value":1653},{"type":606,"tag":636,"props":5540,"children":5541},{"style":648},[5542],{"type":612,"value":5543}," {\n",{"type":606,"tag":636,"props":5545,"children":5546},{"class":638,"line":367},[5547,5552],{"type":606,"tag":636,"props":5548,"children":5549},{"style":689},[5550],{"type":612,"value":5551},"        'total_users'",{"type":606,"tag":636,"props":5553,"children":5554},{"style":648},[5555],{"type":612,"value":5556},": total_users,\n",{"type":606,"tag":636,"props":5558,"children":5559},{"class":638,"line":376},[5560,5565],{"type":606,"tag":636,"props":5561,"children":5562},{"style":689},[5563],{"type":612,"value":5564},"        'total_posts'",{"type":606,"tag":636,"props":5566,"children":5567},{"style":648},[5568],{"type":612,"value":5569},": total_posts,\n",{"type":606,"tag":636,"props":5571,"children":5572},{"class":638,"line":385},[5573,5578],{"type":606,"tag":636,"props":5574,"children":5575},{"style":689},[5576],{"type":612,"value":5577},"        'user_post_counts'",{"type":606,"tag":636,"props":5579,"children":5580},{"style":648},[5581],{"type":612,"value":5582},": user_post_counts,\n",{"type":606,"tag":636,"props":5584,"children":5585},{"class":638,"line":394},[5586,5591],{"type":606,"tag":636,"props":5587,"children":5588},{"style":689},[5589],{"type":612,"value":5590},"        'recent_posts'",{"type":606,"tag":636,"props":5592,"children":5593},{"style":648},[5594],{"type":612,"value":5595},": recent_posts\n",{"type":606,"tag":636,"props":5597,"children":5598},{"class":638,"line":403},[5599],{"type":606,"tag":636,"props":5600,"children":5601},{"style":648},[5602],{"type":612,"value":5603},"    }\n",{"type":606,"tag":636,"props":5605,"children":5606},{"class":638,"line":412},[5607],{"type":606,"tag":636,"props":5608,"children":5609},{"emptyLinePlaceholder":13},[5610],{"type":612,"value":659},{"type":606,"tag":636,"props":5612,"children":5613},{"class":638,"line":423},[5614,5618,5623],{"type":606,"tag":636,"props":5615,"children":5616},{"style":642},[5617],{"type":612,"value":1383},{"type":606,"tag":636,"props":5619,"children":5620},{"style":1386},[5621],{"type":612,"value":5622}," search_database",{"type":606,"tag":636,"props":5624,"children":5625},{"style":648},[5626],{"type":612,"value":5627},"(search_term):\n",{"type":606,"tag":636,"props":5629,"children":5630},{"class":638,"line":432},[5631],{"type":606,"tag":636,"props":5632,"children":5633},{"style":689},[5634],{"type":612,"value":5635},"    \"\"\"Search across users and posts\"\"\"\n",{"type":606,"tag":636,"props":5637,"children":5638},{"class":638,"line":441},[5639,5643,5647,5651,5655],{"type":606,"tag":636,"props":5640,"children":5641},{"style":648},[5642],{"type":612,"value":1410},{"type":606,"tag":636,"props":5644,"children":5645},{"style":642},[5646],{"type":612,"value":681},{"type":606,"tag":636,"props":5648,"children":5649},{"style":648},[5650],{"type":612,"value":686},{"type":606,"tag":636,"props":5652,"children":5653},{"style":689},[5654],{"type":612,"value":1423},{"type":606,"tag":636,"props":5656,"children":5657},{"style":648},[5658],{"type":612,"value":697},{"type":606,"tag":636,"props":5660,"children":5661},{"class":638,"line":450},[5662,5666,5670],{"type":606,"tag":636,"props":5663,"children":5664},{"style":648},[5665],{"type":612,"value":2214},{"type":606,"tag":636,"props":5667,"children":5668},{"style":642},[5669],{"type":612,"value":681},{"type":606,"tag":636,"props":5671,"children":5672},{"style":648},[5673],{"type":612,"value":2223},{"type":606,"tag":636,"props":5675,"children":5676},{"class":638,"line":459},[5677,5681,5685],{"type":606,"tag":636,"props":5678,"children":5679},{"style":648},[5680],{"type":612,"value":1435},{"type":606,"tag":636,"props":5682,"children":5683},{"style":642},[5684],{"type":612,"value":681},{"type":606,"tag":636,"props":5686,"children":5687},{"style":648},[5688],{"type":612,"value":714},{"type":606,"tag":636,"props":5690,"children":5691},{"class":638,"line":468},[5692],{"type":606,"tag":636,"props":5693,"children":5694},{"style":648},[5695],{"type":612,"value":1451},{"type":606,"tag":636,"props":5697,"children":5698},{"class":638,"line":477},[5699],{"type":606,"tag":636,"props":5700,"children":5701},{"style":665},[5702],{"type":612,"value":5703},"    # Search in usernames and emails\n",{"type":606,"tag":636,"props":5705,"children":5706},{"class":638,"line":488},[5707,5711],{"type":606,"tag":636,"props":5708,"children":5709},{"style":648},[5710],{"type":612,"value":1467},{"type":606,"tag":636,"props":5712,"children":5713},{"style":689},[5714],{"type":612,"value":742},{"type":606,"tag":636,"props":5716,"children":5717},{"class":638,"line":497},[5718],{"type":606,"tag":636,"props":5719,"children":5720},{"style":689},[5721],{"type":612,"value":5722},"        SELECT 'user' as type, username as title, email as content\n",{"type":606,"tag":636,"props":5724,"children":5725},{"class":638,"line":506},[5726],{"type":606,"tag":636,"props":5727,"children":5728},{"style":689},[5729],{"type":612,"value":5730},"        FROM users\n",{"type":606,"tag":636,"props":5732,"children":5733},{"class":638,"line":515},[5734],{"type":606,"tag":636,"props":5735,"children":5736},{"style":689},[5737],{"type":612,"value":5738},"        WHERE username LIKE ? OR email LIKE ?\n",{"type":606,"tag":636,"props":5740,"children":5741},{"class":638,"line":524},[5742,5746,5750,5754,5758,5762,5767,5771,5775,5779,5783,5787,5791,5795,5799,5803],{"type":606,"tag":636,"props":5743,"children":5744},{"style":689},[5745],{"type":612,"value":1527},{"type":606,"tag":636,"props":5747,"children":5748},{"style":648},[5749],{"type":612,"value":2664},{"type":606,"tag":636,"props":5751,"children":5752},{"style":642},[5753],{"type":612,"value":1091},{"type":606,"tag":636,"props":5755,"children":5756},{"style":689},[5757],{"type":612,"value":2673},{"type":606,"tag":636,"props":5759,"children":5760},{"style":865},[5761],{"type":612,"value":1101},{"type":606,"tag":636,"props":5763,"children":5764},{"style":648},[5765],{"type":612,"value":5766},"search_term",{"type":606,"tag":636,"props":5768,"children":5769},{"style":865},[5770],{"type":612,"value":1121},{"type":606,"tag":636,"props":5772,"children":5773},{"style":689},[5774],{"type":612,"value":2691},{"type":606,"tag":636,"props":5776,"children":5777},{"style":648},[5778],{"type":612,"value":853},{"type":606,"tag":636,"props":5780,"children":5781},{"style":642},[5782],{"type":612,"value":1091},{"type":606,"tag":636,"props":5784,"children":5785},{"style":689},[5786],{"type":612,"value":2673},{"type":606,"tag":636,"props":5788,"children":5789},{"style":865},[5790],{"type":612,"value":1101},{"type":606,"tag":636,"props":5792,"children":5793},{"style":648},[5794],{"type":612,"value":5766},{"type":606,"tag":636,"props":5796,"children":5797},{"style":865},[5798],{"type":612,"value":1121},{"type":606,"tag":636,"props":5800,"children":5801},{"style":689},[5802],{"type":612,"value":2691},{"type":606,"tag":636,"props":5804,"children":5805},{"style":648},[5806],{"type":612,"value":2724},{"type":606,"tag":636,"props":5808,"children":5809},{"class":638,"line":533},[5810],{"type":606,"tag":636,"props":5811,"children":5812},{"style":648},[5813],{"type":612,"value":1451},{"type":606,"tag":636,"props":5815,"children":5816},{"class":638,"line":544},[5817,5822,5826],{"type":606,"tag":636,"props":5818,"children":5819},{"style":648},[5820],{"type":612,"value":5821},"    user_results ",{"type":606,"tag":636,"props":5823,"children":5824},{"style":642},[5825],{"type":612,"value":681},{"type":606,"tag":636,"props":5827,"children":5828},{"style":648},[5829],{"type":612,"value":1022},{"type":606,"tag":636,"props":5831,"children":5832},{"class":638,"line":553},[5833],{"type":606,"tag":636,"props":5834,"children":5835},{"style":648},[5836],{"type":612,"value":1451},{"type":606,"tag":636,"props":5838,"children":5839},{"class":638,"line":562},[5840],{"type":606,"tag":636,"props":5841,"children":5842},{"style":665},[5843],{"type":612,"value":5844},"    # Search in post titles and content\n",{"type":606,"tag":636,"props":5846,"children":5847},{"class":638,"line":571},[5848,5852],{"type":606,"tag":636,"props":5849,"children":5850},{"style":648},[5851],{"type":612,"value":1467},{"type":606,"tag":636,"props":5853,"children":5854},{"style":689},[5855],{"type":612,"value":742},{"type":606,"tag":636,"props":5857,"children":5858},{"class":638,"line":580},[5859],{"type":606,"tag":636,"props":5860,"children":5861},{"style":689},[5862],{"type":612,"value":5863},"        SELECT 'post' as type, p.title, p.content, u.username as author\n",{"type":606,"tag":636,"props":5865,"children":5866},{"class":638,"line":589},[5867],{"type":606,"tag":636,"props":5868,"children":5869},{"style":689},[5870],{"type":612,"value":2457},{"type":606,"tag":636,"props":5872,"children":5873},{"class":638,"line":2998},[5874],{"type":606,"tag":636,"props":5875,"children":5876},{"style":689},[5877],{"type":612,"value":2465},{"type":606,"tag":636,"props":5879,"children":5880},{"class":638,"line":3048},[5881],{"type":606,"tag":636,"props":5882,"children":5883},{"style":689},[5884],{"type":612,"value":2644},{"type":606,"tag":636,"props":5886,"children":5887},{"class":638,"line":3056},[5888,5892,5896,5900,5904,5908,5912,5916,5920,5924,5928,5932,5936,5940,5944,5948],{"type":606,"tag":636,"props":5889,"children":5890},{"style":689},[5891],{"type":612,"value":1527},{"type":606,"tag":636,"props":5893,"children":5894},{"style":648},[5895],{"type":612,"value":2664},{"type":606,"tag":636,"props":5897,"children":5898},{"style":642},[5899],{"type":612,"value":1091},{"type":606,"tag":636,"props":5901,"children":5902},{"style":689},[5903],{"type":612,"value":2673},{"type":606,"tag":636,"props":5905,"children":5906},{"style":865},[5907],{"type":612,"value":1101},{"type":606,"tag":636,"props":5909,"children":5910},{"style":648},[5911],{"type":612,"value":5766},{"type":606,"tag":636,"props":5913,"children":5914},{"style":865},[5915],{"type":612,"value":1121},{"type":606,"tag":636,"props":5917,"children":5918},{"style":689},[5919],{"type":612,"value":2691},{"type":606,"tag":636,"props":5921,"children":5922},{"style":648},[5923],{"type":612,"value":853},{"type":606,"tag":636,"props":5925,"children":5926},{"style":642},[5927],{"type":612,"value":1091},{"type":606,"tag":636,"props":5929,"children":5930},{"style":689},[5931],{"type":612,"value":2673},{"type":606,"tag":636,"props":5933,"children":5934},{"style":865},[5935],{"type":612,"value":1101},{"type":606,"tag":636,"props":5937,"children":5938},{"style":648},[5939],{"type":612,"value":5766},{"type":606,"tag":636,"props":5941,"children":5942},{"style":865},[5943],{"type":612,"value":1121},{"type":606,"tag":636,"props":5945,"children":5946},{"style":689},[5947],{"type":612,"value":2691},{"type":606,"tag":636,"props":5949,"children":5950},{"style":648},[5951],{"type":612,"value":2724},{"type":606,"tag":636,"props":5953,"children":5954},{"class":638,"line":3085},[5955],{"type":606,"tag":636,"props":5956,"children":5957},{"style":648},[5958],{"type":612,"value":1451},{"type":606,"tag":636,"props":5960,"children":5961},{"class":638,"line":3112},[5962,5967,5971],{"type":606,"tag":636,"props":5963,"children":5964},{"style":648},[5965],{"type":612,"value":5966},"    post_results ",{"type":606,"tag":636,"props":5968,"children":5969},{"style":642},[5970],{"type":612,"value":681},{"type":606,"tag":636,"props":5972,"children":5973},{"style":648},[5974],{"type":612,"value":1022},{"type":606,"tag":636,"props":5976,"children":5977},{"class":638,"line":3133},[5978],{"type":606,"tag":636,"props":5979,"children":5980},{"style":648},[5981],{"type":612,"value":1451},{"type":606,"tag":636,"props":5983,"children":5984},{"class":638,"line":4454},[5985],{"type":606,"tag":636,"props":5986,"children":5987},{"style":648},[5988],{"type":612,"value":2349},{"type":606,"tag":636,"props":5990,"children":5991},{"class":638,"line":4462},[5992],{"type":606,"tag":636,"props":5993,"children":5994},{"style":648},[5995],{"type":612,"value":1451},{"type":606,"tag":636,"props":5997,"children":5998},{"class":638,"line":4475},[5999,6003],{"type":606,"tag":636,"props":6000,"children":6001},{"style":642},[6002],{"type":612,"value":1653},{"type":606,"tag":636,"props":6004,"children":6005},{"style":648},[6006],{"type":612,"value":5543},{"type":606,"tag":636,"props":6008,"children":6009},{"class":638,"line":4484},[6010,6015],{"type":606,"tag":636,"props":6011,"children":6012},{"style":689},[6013],{"type":612,"value":6014},"        'users'",{"type":606,"tag":636,"props":6016,"children":6017},{"style":648},[6018],{"type":612,"value":6019},": user_results,\n",{"type":606,"tag":636,"props":6021,"children":6022},{"class":638,"line":4492},[6023,6028],{"type":606,"tag":636,"props":6024,"children":6025},{"style":689},[6026],{"type":612,"value":6027},"        'posts'",{"type":606,"tag":636,"props":6029,"children":6030},{"style":648},[6031],{"type":612,"value":6032},": post_results\n",{"type":606,"tag":636,"props":6034,"children":6035},{"class":638,"line":4500},[6036],{"type":606,"tag":636,"props":6037,"children":6038},{"style":648},[6039],{"type":612,"value":5603},{"type":606,"tag":636,"props":6041,"children":6042},{"class":638,"line":4517},[6043],{"type":606,"tag":636,"props":6044,"children":6045},{"emptyLinePlaceholder":13},[6046],{"type":612,"value":659},{"type":606,"tag":636,"props":6048,"children":6049},{"class":638,"line":4525},[6050],{"type":606,"tag":636,"props":6051,"children":6052},{"style":665},[6053],{"type":612,"value":6054},"# Get statistics\n",{"type":606,"tag":636,"props":6056,"children":6057},{"class":638,"line":4533},[6058,6063,6067],{"type":606,"tag":636,"props":6059,"children":6060},{"style":648},[6061],{"type":612,"value":6062},"stats ",{"type":606,"tag":636,"props":6064,"children":6065},{"style":642},[6066],{"type":612,"value":681},{"type":606,"tag":636,"props":6068,"children":6069},{"style":648},[6070],{"type":612,"value":6071}," get_user_statistics()\n",{"type":606,"tag":636,"props":6073,"children":6074},{"class":638,"line":4541},[6075,6079,6083,6087,6092],{"type":606,"tag":636,"props":6076,"children":6077},{"style":865},[6078],{"type":612,"value":1037},{"type":606,"tag":636,"props":6080,"children":6081},{"style":648},[6082],{"type":612,"value":1042},{"type":606,"tag":636,"props":6084,"children":6085},{"style":642},[6086],{"type":612,"value":1091},{"type":606,"tag":636,"props":6088,"children":6089},{"style":689},[6090],{"type":612,"value":6091},"\"Database Statistics:\"",{"type":606,"tag":636,"props":6093,"children":6094},{"style":648},[6095],{"type":612,"value":697},{"type":606,"tag":636,"props":6097,"children":6098},{"class":638,"line":4584},[6099,6103,6107,6111,6116,6120,6125,6130,6134,6138,6142],{"type":606,"tag":636,"props":6100,"children":6101},{"style":865},[6102],{"type":612,"value":1037},{"type":606,"tag":636,"props":6104,"children":6105},{"style":648},[6106],{"type":612,"value":1042},{"type":606,"tag":636,"props":6108,"children":6109},{"style":642},[6110],{"type":612,"value":1091},{"type":606,"tag":636,"props":6112,"children":6113},{"style":689},[6114],{"type":612,"value":6115},"\"  Total users: ",{"type":606,"tag":636,"props":6117,"children":6118},{"style":865},[6119],{"type":612,"value":1101},{"type":606,"tag":636,"props":6121,"children":6122},{"style":648},[6123],{"type":612,"value":6124},"stats[",{"type":606,"tag":636,"props":6126,"children":6127},{"style":689},[6128],{"type":612,"value":6129},"'total_users'",{"type":606,"tag":636,"props":6131,"children":6132},{"style":648},[6133],{"type":612,"value":1116},{"type":606,"tag":636,"props":6135,"children":6136},{"style":865},[6137],{"type":612,"value":1121},{"type":606,"tag":636,"props":6139,"children":6140},{"style":689},[6141],{"type":612,"value":2909},{"type":606,"tag":636,"props":6143,"children":6144},{"style":648},[6145],{"type":612,"value":697},{"type":606,"tag":636,"props":6147,"children":6148},{"class":638,"line":4597},[6149,6153,6157,6161,6166,6170,6174,6179,6183,6187,6191],{"type":606,"tag":636,"props":6150,"children":6151},{"style":865},[6152],{"type":612,"value":1037},{"type":606,"tag":636,"props":6154,"children":6155},{"style":648},[6156],{"type":612,"value":1042},{"type":606,"tag":636,"props":6158,"children":6159},{"style":642},[6160],{"type":612,"value":1091},{"type":606,"tag":636,"props":6162,"children":6163},{"style":689},[6164],{"type":612,"value":6165},"\"  Total posts: ",{"type":606,"tag":636,"props":6167,"children":6168},{"style":865},[6169],{"type":612,"value":1101},{"type":606,"tag":636,"props":6171,"children":6172},{"style":648},[6173],{"type":612,"value":6124},{"type":606,"tag":636,"props":6175,"children":6176},{"style":689},[6177],{"type":612,"value":6178},"'total_posts'",{"type":606,"tag":636,"props":6180,"children":6181},{"style":648},[6182],{"type":612,"value":1116},{"type":606,"tag":636,"props":6184,"children":6185},{"style":865},[6186],{"type":612,"value":1121},{"type":606,"tag":636,"props":6188,"children":6189},{"style":689},[6190],{"type":612,"value":2909},{"type":606,"tag":636,"props":6192,"children":6193},{"style":648},[6194],{"type":612,"value":697},{"type":606,"tag":636,"props":6196,"children":6197},{"class":638,"line":4605},[6198],{"type":606,"tag":636,"props":6199,"children":6200},{"emptyLinePlaceholder":13},[6201],{"type":612,"value":659},{"type":606,"tag":636,"props":6203,"children":6204},{"class":638,"line":4623},[6205,6209,6213,6217,6221,6226],{"type":606,"tag":636,"props":6206,"children":6207},{"style":865},[6208],{"type":612,"value":1037},{"type":606,"tag":636,"props":6210,"children":6211},{"style":648},[6212],{"type":612,"value":1042},{"type":606,"tag":636,"props":6214,"children":6215},{"style":689},[6216],{"type":612,"value":2909},{"type":606,"tag":636,"props":6218,"children":6219},{"style":865},[6220],{"type":612,"value":2940},{"type":606,"tag":636,"props":6222,"children":6223},{"style":689},[6224],{"type":612,"value":6225},"Posts per user:\"",{"type":606,"tag":636,"props":6227,"children":6228},{"style":648},[6229],{"type":612,"value":697},{"type":606,"tag":636,"props":6231,"children":6232},{"class":638,"line":4632},[6233,6237,6242,6246,6251,6256],{"type":606,"tag":636,"props":6234,"children":6235},{"style":642},[6236],{"type":612,"value":1059},{"type":606,"tag":636,"props":6238,"children":6239},{"style":648},[6240],{"type":612,"value":6241}," username, count ",{"type":606,"tag":636,"props":6243,"children":6244},{"style":642},[6245],{"type":612,"value":1069},{"type":606,"tag":636,"props":6247,"children":6248},{"style":648},[6249],{"type":612,"value":6250}," stats[",{"type":606,"tag":636,"props":6252,"children":6253},{"style":689},[6254],{"type":612,"value":6255},"'user_post_counts'",{"type":606,"tag":636,"props":6257,"children":6258},{"style":648},[6259],{"type":612,"value":6260},"]:\n",{"type":606,"tag":636,"props":6262,"children":6263},{"class":638,"line":4652},[6264,6268,6272,6276,6280,6284,6288,6292,6297,6301,6306,6310,6315],{"type":606,"tag":636,"props":6265,"children":6266},{"style":865},[6267],{"type":612,"value":1082},{"type":606,"tag":636,"props":6269,"children":6270},{"style":648},[6271],{"type":612,"value":1042},{"type":606,"tag":636,"props":6273,"children":6274},{"style":642},[6275],{"type":612,"value":1091},{"type":606,"tag":636,"props":6277,"children":6278},{"style":689},[6279],{"type":612,"value":1096},{"type":606,"tag":636,"props":6281,"children":6282},{"style":865},[6283],{"type":612,"value":1101},{"type":606,"tag":636,"props":6285,"children":6286},{"style":648},[6287],{"type":612,"value":4118},{"type":606,"tag":636,"props":6289,"children":6290},{"style":865},[6291],{"type":612,"value":1121},{"type":606,"tag":636,"props":6293,"children":6294},{"style":689},[6295],{"type":612,"value":6296},": ",{"type":606,"tag":636,"props":6298,"children":6299},{"style":865},[6300],{"type":612,"value":1101},{"type":606,"tag":636,"props":6302,"children":6303},{"style":648},[6304],{"type":612,"value":6305},"count",{"type":606,"tag":636,"props":6307,"children":6308},{"style":865},[6309],{"type":612,"value":1121},{"type":606,"tag":636,"props":6311,"children":6312},{"style":689},[6313],{"type":612,"value":6314}," posts\"",{"type":606,"tag":636,"props":6316,"children":6317},{"style":648},[6318],{"type":612,"value":697},{"type":606,"tag":636,"props":6320,"children":6321},{"class":638,"line":4668},[6322],{"type":606,"tag":636,"props":6323,"children":6324},{"emptyLinePlaceholder":13},[6325],{"type":612,"value":659},{"type":606,"tag":636,"props":6327,"children":6328},{"class":638,"line":4676},[6329,6333,6337,6341,6345,6350],{"type":606,"tag":636,"props":6330,"children":6331},{"style":865},[6332],{"type":612,"value":1037},{"type":606,"tag":636,"props":6334,"children":6335},{"style":648},[6336],{"type":612,"value":1042},{"type":606,"tag":636,"props":6338,"children":6339},{"style":689},[6340],{"type":612,"value":2909},{"type":606,"tag":636,"props":6342,"children":6343},{"style":865},[6344],{"type":612,"value":2940},{"type":606,"tag":636,"props":6346,"children":6347},{"style":689},[6348],{"type":612,"value":6349},"Recent posts:\"",{"type":606,"tag":636,"props":6351,"children":6352},{"style":648},[6353],{"type":612,"value":697},{"type":606,"tag":636,"props":6355,"children":6356},{"class":638,"line":4694},[6357,6361,6366,6370,6374,6379],{"type":606,"tag":636,"props":6358,"children":6359},{"style":642},[6360],{"type":612,"value":1059},{"type":606,"tag":636,"props":6362,"children":6363},{"style":648},[6364],{"type":612,"value":6365}," title, username, date ",{"type":606,"tag":636,"props":6367,"children":6368},{"style":642},[6369],{"type":612,"value":1069},{"type":606,"tag":636,"props":6371,"children":6372},{"style":648},[6373],{"type":612,"value":6250},{"type":606,"tag":636,"props":6375,"children":6376},{"style":689},[6377],{"type":612,"value":6378},"'recent_posts'",{"type":606,"tag":636,"props":6380,"children":6381},{"style":648},[6382],{"type":612,"value":6260},{"type":606,"tag":636,"props":6384,"children":6385},{"class":638,"line":4710},[6386,6390,6394,6398,6403,6407,6412,6416,6421,6425,6429,6433,6437],{"type":606,"tag":636,"props":6387,"children":6388},{"style":865},[6389],{"type":612,"value":1082},{"type":606,"tag":636,"props":6391,"children":6392},{"style":648},[6393],{"type":612,"value":1042},{"type":606,"tag":636,"props":6395,"children":6396},{"style":642},[6397],{"type":612,"value":1091},{"type":606,"tag":636,"props":6399,"children":6400},{"style":689},[6401],{"type":612,"value":6402},"\"  '",{"type":606,"tag":636,"props":6404,"children":6405},{"style":865},[6406],{"type":612,"value":1101},{"type":606,"tag":636,"props":6408,"children":6409},{"style":648},[6410],{"type":612,"value":6411},"title",{"type":606,"tag":636,"props":6413,"children":6414},{"style":865},[6415],{"type":612,"value":1121},{"type":606,"tag":636,"props":6417,"children":6418},{"style":689},[6419],{"type":612,"value":6420},"' by ",{"type":606,"tag":636,"props":6422,"children":6423},{"style":865},[6424],{"type":612,"value":1101},{"type":606,"tag":636,"props":6426,"children":6427},{"style":648},[6428],{"type":612,"value":4118},{"type":606,"tag":636,"props":6430,"children":6431},{"style":865},[6432],{"type":612,"value":1121},{"type":606,"tag":636,"props":6434,"children":6435},{"style":689},[6436],{"type":612,"value":2909},{"type":606,"tag":636,"props":6438,"children":6439},{"style":648},[6440],{"type":612,"value":697},{"type":606,"tag":636,"props":6442,"children":6443},{"class":638,"line":4718},[6444],{"type":606,"tag":636,"props":6445,"children":6446},{"emptyLinePlaceholder":13},[6447],{"type":612,"value":659},{"type":606,"tag":636,"props":6449,"children":6450},{"class":638,"line":4726},[6451],{"type":606,"tag":636,"props":6452,"children":6453},{"style":665},[6454],{"type":612,"value":6455},"# Search database\n",{"type":606,"tag":636,"props":6457,"children":6458},{"class":638,"line":4734},[6459,6464,6468,6473,6477],{"type":606,"tag":636,"props":6460,"children":6461},{"style":648},[6462],{"type":612,"value":6463},"search_results ",{"type":606,"tag":636,"props":6465,"children":6466},{"style":642},[6467],{"type":612,"value":681},{"type":606,"tag":636,"props":6469,"children":6470},{"style":648},[6471],{"type":612,"value":6472}," search_database(",{"type":606,"tag":636,"props":6474,"children":6475},{"style":689},[6476],{"type":612,"value":3105},{"type":606,"tag":636,"props":6478,"children":6479},{"style":648},[6480],{"type":612,"value":697},{"type":606,"tag":636,"props":6482,"children":6483},{"class":638,"line":4758},[6484,6488,6492,6496,6500,6504,6509],{"type":606,"tag":636,"props":6485,"children":6486},{"style":865},[6487],{"type":612,"value":1037},{"type":606,"tag":636,"props":6489,"children":6490},{"style":648},[6491],{"type":612,"value":1042},{"type":606,"tag":636,"props":6493,"children":6494},{"style":642},[6495],{"type":612,"value":1091},{"type":606,"tag":636,"props":6497,"children":6498},{"style":689},[6499],{"type":612,"value":2909},{"type":606,"tag":636,"props":6501,"children":6502},{"style":865},[6503],{"type":612,"value":2940},{"type":606,"tag":636,"props":6505,"children":6506},{"style":689},[6507],{"type":612,"value":6508},"Search results for 'Python':\"",{"type":606,"tag":636,"props":6510,"children":6511},{"style":648},[6512],{"type":612,"value":697},{"type":606,"tag":636,"props":6514,"children":6515},{"class":638,"line":4800},[6516],{"type":606,"tag":636,"props":6517,"children":6518},{"emptyLinePlaceholder":13},[6519],{"type":612,"value":659},{"type":606,"tag":636,"props":6521,"children":6522},{"class":638,"line":4812},[6523,6527,6532,6537],{"type":606,"tag":636,"props":6524,"children":6525},{"style":642},[6526],{"type":612,"value":5030},{"type":606,"tag":636,"props":6528,"children":6529},{"style":648},[6530],{"type":612,"value":6531}," search_results[",{"type":606,"tag":636,"props":6533,"children":6534},{"style":689},[6535],{"type":612,"value":6536},"'users'",{"type":606,"tag":636,"props":6538,"children":6539},{"style":648},[6540],{"type":612,"value":6260},{"type":606,"tag":636,"props":6542,"children":6543},{"class":638,"line":4824},[6544,6548,6552,6557],{"type":606,"tag":636,"props":6545,"children":6546},{"style":865},[6547],{"type":612,"value":1082},{"type":606,"tag":636,"props":6549,"children":6550},{"style":648},[6551],{"type":612,"value":1042},{"type":606,"tag":636,"props":6553,"children":6554},{"style":689},[6555],{"type":612,"value":6556},"\"Users:\"",{"type":606,"tag":636,"props":6558,"children":6559},{"style":648},[6560],{"type":612,"value":697},{"type":606,"tag":636,"props":6562,"children":6563},{"class":638,"line":4864},[6564,6569,6573,6577,6581,6585],{"type":606,"tag":636,"props":6565,"children":6566},{"style":642},[6567],{"type":612,"value":6568},"    for",{"type":606,"tag":636,"props":6570,"children":6571},{"style":648},[6572],{"type":612,"value":1064},{"type":606,"tag":636,"props":6574,"children":6575},{"style":642},[6576],{"type":612,"value":1069},{"type":606,"tag":636,"props":6578,"children":6579},{"style":648},[6580],{"type":612,"value":6531},{"type":606,"tag":636,"props":6582,"children":6583},{"style":689},[6584],{"type":612,"value":6536},{"type":606,"tag":636,"props":6586,"children":6587},{"style":648},[6588],{"type":612,"value":6260},{"type":606,"tag":636,"props":6590,"children":6591},{"class":638,"line":4876},[6592,6596,6600,6604,6608,6612,6616,6620,6624,6628,6632,6636,6640,6645,6649,6653,6657],{"type":606,"tag":636,"props":6593,"children":6594},{"style":865},[6595],{"type":612,"value":4547},{"type":606,"tag":636,"props":6597,"children":6598},{"style":648},[6599],{"type":612,"value":1042},{"type":606,"tag":636,"props":6601,"children":6602},{"style":642},[6603],{"type":612,"value":1091},{"type":606,"tag":636,"props":6605,"children":6606},{"style":689},[6607],{"type":612,"value":1096},{"type":606,"tag":636,"props":6609,"children":6610},{"style":865},[6611],{"type":612,"value":1101},{"type":606,"tag":636,"props":6613,"children":6614},{"style":648},[6615],{"type":612,"value":1106},{"type":606,"tag":636,"props":6617,"children":6618},{"style":689},[6619],{"type":612,"value":3029},{"type":606,"tag":636,"props":6621,"children":6622},{"style":648},[6623],{"type":612,"value":1116},{"type":606,"tag":636,"props":6625,"children":6626},{"style":865},[6627],{"type":612,"value":1121},{"type":606,"tag":636,"props":6629,"children":6630},{"style":689},[6631],{"type":612,"value":2883},{"type":606,"tag":636,"props":6633,"children":6634},{"style":865},[6635],{"type":612,"value":1101},{"type":606,"tag":636,"props":6637,"children":6638},{"style":648},[6639],{"type":612,"value":1106},{"type":606,"tag":636,"props":6641,"children":6642},{"style":689},[6643],{"type":612,"value":6644},"'content'",{"type":606,"tag":636,"props":6646,"children":6647},{"style":648},[6648],{"type":612,"value":1116},{"type":606,"tag":636,"props":6650,"children":6651},{"style":865},[6652],{"type":612,"value":1121},{"type":606,"tag":636,"props":6654,"children":6655},{"style":689},[6656],{"type":612,"value":2909},{"type":606,"tag":636,"props":6658,"children":6659},{"style":648},[6660],{"type":612,"value":697},{"type":606,"tag":636,"props":6662,"children":6663},{"class":638,"line":4884},[6664],{"type":606,"tag":636,"props":6665,"children":6666},{"emptyLinePlaceholder":13},[6667],{"type":612,"value":659},{"type":606,"tag":636,"props":6669,"children":6670},{"class":638,"line":4893},[6671,6675,6679,6684],{"type":606,"tag":636,"props":6672,"children":6673},{"style":642},[6674],{"type":612,"value":5030},{"type":606,"tag":636,"props":6676,"children":6677},{"style":648},[6678],{"type":612,"value":6531},{"type":606,"tag":636,"props":6680,"children":6681},{"style":689},[6682],{"type":612,"value":6683},"'posts'",{"type":606,"tag":636,"props":6685,"children":6686},{"style":648},[6687],{"type":612,"value":6260},{"type":606,"tag":636,"props":6689,"children":6690},{"class":638,"line":4911},[6691,6695,6699,6704],{"type":606,"tag":636,"props":6692,"children":6693},{"style":865},[6694],{"type":612,"value":1082},{"type":606,"tag":636,"props":6696,"children":6697},{"style":648},[6698],{"type":612,"value":1042},{"type":606,"tag":636,"props":6700,"children":6701},{"style":689},[6702],{"type":612,"value":6703},"\"Posts:\"",{"type":606,"tag":636,"props":6705,"children":6706},{"style":648},[6707],{"type":612,"value":697},{"type":606,"tag":636,"props":6709,"children":6710},{"class":638,"line":4919},[6711,6715,6719,6723,6727,6731],{"type":606,"tag":636,"props":6712,"children":6713},{"style":642},[6714],{"type":612,"value":6568},{"type":606,"tag":636,"props":6716,"children":6717},{"style":648},[6718],{"type":612,"value":2986},{"type":606,"tag":636,"props":6720,"children":6721},{"style":642},[6722],{"type":612,"value":1069},{"type":606,"tag":636,"props":6724,"children":6725},{"style":648},[6726],{"type":612,"value":6531},{"type":606,"tag":636,"props":6728,"children":6729},{"style":689},[6730],{"type":612,"value":6683},{"type":606,"tag":636,"props":6732,"children":6733},{"style":648},[6734],{"type":612,"value":6260},{"type":606,"tag":636,"props":6736,"children":6737},{"class":638,"line":4928},[6738,6742,6746,6750,6754,6758,6762,6766,6770,6774,6778,6782,6786,6791,6795,6799,6803],{"type":606,"tag":636,"props":6739,"children":6740},{"style":865},[6741],{"type":612,"value":4547},{"type":606,"tag":636,"props":6743,"children":6744},{"style":648},[6745],{"type":612,"value":1042},{"type":606,"tag":636,"props":6747,"children":6748},{"style":642},[6749],{"type":612,"value":1091},{"type":606,"tag":636,"props":6751,"children":6752},{"style":689},[6753],{"type":612,"value":6402},{"type":606,"tag":636,"props":6755,"children":6756},{"style":865},[6757],{"type":612,"value":1101},{"type":606,"tag":636,"props":6759,"children":6760},{"style":648},[6761],{"type":612,"value":3024},{"type":606,"tag":636,"props":6763,"children":6764},{"style":689},[6765],{"type":612,"value":3029},{"type":606,"tag":636,"props":6767,"children":6768},{"style":648},[6769],{"type":612,"value":1116},{"type":606,"tag":636,"props":6771,"children":6772},{"style":865},[6773],{"type":612,"value":1121},{"type":606,"tag":636,"props":6775,"children":6776},{"style":689},[6777],{"type":612,"value":6420},{"type":606,"tag":636,"props":6779,"children":6780},{"style":865},[6781],{"type":612,"value":1101},{"type":606,"tag":636,"props":6783,"children":6784},{"style":648},[6785],{"type":612,"value":3024},{"type":606,"tag":636,"props":6787,"children":6788},{"style":689},[6789],{"type":612,"value":6790},"'author'",{"type":606,"tag":636,"props":6792,"children":6793},{"style":648},[6794],{"type":612,"value":1116},{"type":606,"tag":636,"props":6796,"children":6797},{"style":865},[6798],{"type":612,"value":1121},{"type":606,"tag":636,"props":6800,"children":6801},{"style":689},[6802],{"type":612,"value":2909},{"type":606,"tag":636,"props":6804,"children":6805},{"style":648},[6806],{"type":612,"value":697},{"type":606,"tag":1173,"props":6808,"children":6810},{"id":6809},"key-takeaways",[6811],{"type":612,"value":6812},"🎯 Key Takeaways",{"type":606,"tag":1185,"props":6814,"children":6818},{"emoji":6815,"title":6816,"type":6817},"📚","Database Essentials","success",[6819,6827,6864,6872,6902,6910,6933],{"type":606,"tag":615,"props":6820,"children":6821},{},[6822],{"type":606,"tag":1195,"props":6823,"children":6824},{},[6825],{"type":612,"value":6826},"Basic Operations:",{"type":606,"tag":1201,"props":6828,"children":6829},{},[6830,6843,6854,6859],{"type":606,"tag":1205,"props":6831,"children":6832},{},[6833,6835,6841],{"type":612,"value":6834},"Use ",{"type":606,"tag":632,"props":6836,"children":6838},{"className":6837},[],[6839],{"type":612,"value":6840},"sqlite3.connect()",{"type":612,"value":6842}," to create/open database",{"type":606,"tag":1205,"props":6844,"children":6845},{},[6846,6848],{"type":612,"value":6847},"Execute SQL with ",{"type":606,"tag":632,"props":6849,"children":6851},{"className":6850},[],[6852],{"type":612,"value":6853},"cursor.execute()",{"type":606,"tag":1205,"props":6855,"children":6856},{},[6857],{"type":612,"value":6858},"Use parameterized queries to prevent SQL injection",{"type":606,"tag":1205,"props":6860,"children":6861},{},[6862],{"type":612,"value":6863},"Always commit changes and close connections",{"type":606,"tag":615,"props":6865,"children":6866},{},[6867],{"type":606,"tag":1195,"props":6868,"children":6869},{},[6870],{"type":612,"value":6871},"Best Practices:",{"type":606,"tag":1201,"props":6873,"children":6874},{},[6875,6887,6892,6897],{"type":606,"tag":1205,"props":6876,"children":6877},{},[6878,6879,6885],{"type":612,"value":6834},{"type":606,"tag":632,"props":6880,"children":6882},{"className":6881},[],[6883],{"type":612,"value":6884},"sqlite3.Row",{"type":612,"value":6886}," for named column access",{"type":606,"tag":1205,"props":6888,"children":6889},{},[6890],{"type":612,"value":6891},"Handle database errors with try/except",{"type":606,"tag":1205,"props":6893,"children":6894},{},[6895],{"type":612,"value":6896},"Use transactions for multiple related operations",{"type":606,"tag":1205,"props":6898,"children":6899},{},[6900],{"type":612,"value":6901},"Close connections in finally blocks or use context managers",{"type":606,"tag":615,"props":6903,"children":6904},{},[6905],{"type":606,"tag":1195,"props":6906,"children":6907},{},[6908],{"type":612,"value":6909},"Common Patterns:",{"type":606,"tag":1201,"props":6911,"children":6912},{},[6913,6918,6923,6928],{"type":606,"tag":1205,"props":6914,"children":6915},{},[6916],{"type":612,"value":6917},"CREATE, INSERT, SELECT, UPDATE, DELETE",{"type":606,"tag":1205,"props":6919,"children":6920},{},[6921],{"type":612,"value":6922},"JOINs to combine data from multiple tables",{"type":606,"tag":1205,"props":6924,"children":6925},{},[6926],{"type":612,"value":6927},"Aggregation with GROUP BY and COUNT()",{"type":606,"tag":1205,"props":6929,"children":6930},{},[6931],{"type":612,"value":6932},"Backup and export for data preservation",{"type":606,"tag":615,"props":6934,"children":6935},{},[6936,6941],{"type":606,"tag":1195,"props":6937,"children":6938},{},[6939],{"type":612,"value":6940},"Remember:",{"type":612,"value":6942}," Always use parameterized queries (?) to prevent SQL injection attacks!",{"type":606,"tag":1173,"props":6944,"children":6946},{"id":6945},"whats-next",[6947],{"type":612,"value":6948},"🚀 What's Next?",{"type":606,"tag":615,"props":6950,"children":6951},{},[6952],{"type":612,"value":6953},"Learn techniques for processing large files efficiently without overwhelming system memory.",{"type":606,"tag":615,"props":6955,"children":6956},{},[6957,6962,6963],{"type":606,"tag":1195,"props":6958,"children":6959},{},[6960],{"type":612,"value":6961},"Continue to",{"type":612,"value":6296},{"type":606,"tag":6964,"props":6965,"children":6966},"a",{"href":520},[6967],{"type":612,"value":521},{"type":606,"tag":6969,"props":6970,"children":6971},"style",{},[6972],{"type":612,"value":6973},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}html.app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}",{"title":8,"searchDepth":36,"depth":36,"links":6975},[6976,6980,6981,6985,6986],{"id":1175,"depth":27,"text":1178,"children":6977},[6978,6979],{"id":1344,"depth":36,"text":1347},{"id":2120,"depth":36,"text":2123},{"id":3206,"depth":27,"text":3209},{"id":3419,"depth":27,"text":3422,"children":6982},[6983,6984],{"id":3425,"depth":36,"text":3428},{"id":5122,"depth":36,"text":5125},{"id":6809,"depth":27,"text":6812},{"id":6945,"depth":27,"text":6948},1782373763317]