summaryrefslogtreecommitdiff
path: root/internal/mapr/query.go
AgeCommit message (Collapse)Author
2026-03-04refactor: simplify nil-or-empty token checks in query parser (task 338)Paul Buetow
2026-01-29refactor: improve Go best practices compliancePaul Buetow
- Add explicit interface satisfaction checks (var _ Interface = (*Type)(nil)) for compile-time verification: - TurboWriter implementations (DirectTurboWriter, TurboChannelWriter) - Processor implementations (GrepLineProcessor, ChannellessLineProcessor) - Parser implementations (genericParser, csvParser, genericKVParser, custom parsers, mimecastParser) - Logger implementations (file, stdout) - Handler implementations (ServerHandler, ClientHandler) - Connector implementations (Serverless, ServerConnection) - SSH callback implementations (KnownHostsCallback) - Improve error handling with context wrapping (%w): - SSH operations: GeneratePrivateRSAKey, Agent - Query parsing: Query.parse - SSH client connections: dial, session, handle methods - Fix receiver consistency: - Convert Query.String() from value to pointer receiver - Convert Outfile.String() from value to pointer receiver - Convert all KnownHostsCallback methods to pointer receivers - Convert mapCommand.Start() to pointer receiver - Reorganize file structure for better clarity: - internal/io/dlog/dlog.go: Move type definition before public functions - internal/mapr/token.go: Reorganize helper functions after public ones - Add documentation comments: - Query.String() method - Outfile.String() method - Regex.String() method - Improve config variable documentation All unit tests and integration tests pass. Amp-Thread-ID: https://ampcode.com/threads/T-019c0b08-0eeb-705d-a1f7-31bb764b659a Co-authored-by: Amp <amp@ampcode.com>
2024-03-29lint warningsPaul Buetow
2023-09-07Can quote fields in select conditions, e.g. select `count($foo)`, ..Paul Buetow
2023-09-07document Outfile - tidy modsPaul Buetow
2022-03-14Add "append" modifier for "outfile" keyword to the mapreduce languagePaul Buetow
2021-12-23refactor query parserPaul Buetow
2021-10-10vetting and linting and some code restylingPaul Buetow
2021-10-02move args to config packagePaul Buetow
logger package rewrite as dlog
2020-12-26code cleanup and minor refactoringsPaul Buetow
2020-08-13bump up version to 3.0.0. can run continuous background mapreduce queries, ↵v3.0.0Paul Buetow
useful for log file monitorig for example. breaking protocol change which allows to mapreduce aggreate messages containing the default field separator |. add of more unit tests. add logformat mapreduce query keyword. add set mapreduce clause support and support to evaluate built-in functions such as md5sum() and maskdigits().
2020-07-03refactor mapr clientPaul Buetow
2020-03-07add support to run mapreduce queries on generic log lines, e.g. count all ↵Paul Buetow
log lines containing a certain string, such as "ERROR"
2020-02-28more on scheduled commandsPaul Buetow
2020-02-07Introduce drun command, refactor code to use context packagePaul Bütow
2020-01-21Move commands to cmd/ and move internal dependencies to internal/Paul Bütow