Method for converting Sql result set into Json data based on tree structure
A tree structure and result set technology, applied in the direction of structured data retrieval, electronic digital data processing, database management system, etc., can solve the problem of unable to reflect the hierarchical relationship of row records, and achieve the effect of good promotion and application value.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment
[0021] The method for converting Sql result set based on tree structure to Json data of the present invention obtains sql result set, defines a character string variable root, and introduces an array of key-value pairs at the same time, wherein the primary key is the node number, and the content is the direct subordinate of the node Sub-node collection, continue to loop through subsequent data, if the node number already exists, replace the attributes other than the node number and children, if the node number does not exist, then encapsulate the data and store it in the key-value pair array, insert The parent node number is also cached at the same time. If the parent node number is empty, the parent node number is stored in root. If the parent node number is not empty, find the element whose node number is the parent node number in the key-value pair array. If not found , then add an empty node whose primary key is the parent node number, and then assign the current node numbe...
PUM

Abstract
Description
Claims
Application Information

- R&D
- Intellectual Property
- Life Sciences
- Materials
- Tech Scout
- Unparalleled Data Quality
- Higher Quality Content
- 60% Fewer Hallucinations
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2025 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com