Parse, Don’t Guess

Three days before going open source, I deleted my parser’s smartest feature. 333 lines. 6 functions. 12 passing tests. All green, all clever, all gone. The feature worked. That was the problem. My PostgreSQL parser ( valk-postgres-parser ) extracts structure from SQL text: tables, columns, joins, filters. One of its analysis functions did something more ambitious. Give it a query like this: SELECT * FROM orders o JOIN customers c ON o.customer_id = c.id and it would tell you the foreign key relationship: or

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论