diff --git a/README.md b/README.md index 982ccd8..3567b80 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,14 @@ You can save solution by setting `leetcode-save-solutions`: (setq leetcode-directory "~/leetcode") ``` +### Pandas Mode for Database Problems +If a LeetCode problem provides SQL snippets, `leetcode.el` can now use Pandas +as the prefered language: +```elisp +(setq leetcode-prefer-sql "pythondata") +``` + + # Work with Org Mode `leetcode-show-problem-by-slug` will let you put to org files with a link in this format to show the question after the *leetcode* buffer is load like [elisp:(leetcode-show-problem-by-slug (leetcode--slugify-title "ZigZag Conversion"))] diff --git a/leetcode.el b/leetcode.el index d5198e1..b820fad 100644 --- a/leetcode.el +++ b/leetcode.el @@ -113,8 +113,9 @@ python3, ruby, rust, scala, swift." :type 'string) (defcustom leetcode-prefer-sql "mysql" - "LeetCode sql implementation. -mysql, mssql, oraclesql." + "LeetCode SQL or Pandas implementation. +Possible values: +mysql, mssql, oraclesql, pythondata." :group 'leetcode :type 'string) @@ -227,7 +228,7 @@ Default is programming language.") ("kotlin" . ".kt") ("php" . ".php") ("python" . ".py") ("python3" . ".py") ("racket" . ".rkt") ("ruby" . ".rb") ("rust" . ".rs") ("scala" . ".scala") ("swift" . ".swift") ("typescript" . ".ts") - ("mysql" . ".sql") ("mssql" . ".sql") ("oraclesql" . ".sql")) + ("mysql" . ".sql") ("mssql" . ".sql") ("oraclesql" . ".sql") ("pythondata" . ".py")) "A map of language slug name to LeetCode programming language suffix. c, cpp, csharp, golang, java, javascript, typescript, kotlin, php, python, python3, ruby, rust, scala, swift, mysql, mssql, oraclesql.")