Commit Graph

449 Commits (ddd9a4dec50aa71319be216ac301a042bc25e819)

Author SHA1 Message Date
Vinícius Garcia a7b3c12b95 Remove gorm dependency from Insert()
Although this implementation was meant to work with sqlite and
postgres it was not yet tested with postgres.
2020-12-27 14:26:32 -03:00
Vinícius Garcia 4030768f22 Improve Delete tests 2020-11-26 23:21:45 -03:00
Vinícius Garcia 9e84e4bb1b Remove gorm dependency from Delete() 2020-11-26 22:35:36 -03:00
Vinícius Garcia 1ea81bb8e0 Remove gorm dependency from Query() func 2020-11-23 01:20:13 -03:00
Vinícius Garcia 13bd087cee Remove gorm dependency from QueryOne() 2020-11-22 22:34:24 -03:00
Vinícius Garcia cdad1673f0 Remove gorm dependency from QueryChunks func 2020-11-21 02:51:17 -03:00
Vinícius Garcia 7197f21c7e Add error case tests for scanRows() func 2020-11-21 02:45:46 -03:00
Vinícius Garcia b6f69d52aa Add private scanRows() function 2020-11-21 02:35:56 -03:00
Vinícius Garcia c7e743527f Add README.md 2020-11-10 11:16:39 -03:00
Vinícius Garcia a05d26418f Improve comments for the QueryChunks func 2020-10-28 21:30:10 -03:00
Vinícius Garcia 6978474d41 Improve QueryChunks signature to be easier to use
The changes made on this commit were designed by
Raí Tamarindo (raitamarindo@gmail.com) on a previous meeting.
2020-10-28 08:55:58 -03:00
Vinícius Garcia c1f645216c Improve Update() to pass context to Exec 2020-10-26 15:32:22 -03:00
Vinícius Garcia 733284997f fixup! Remove the gorm dependency from the Update func 2020-10-26 13:21:48 -03:00
Vinícius Garcia 8c1c483462 Improve comments on StructToMap() 2020-10-26 09:36:33 -03:00
Vinícius Garcia 2f386e8541 fixup! Improve tests for the Update() function 2020-10-26 00:16:19 -03:00
Vinícius Garcia 417ea4660f Remove the gorm dependency from the Update func 2020-10-26 00:15:24 -03:00
Vinícius Garcia 4c740118fd Improve tests for the Update() function 2020-10-25 18:04:33 -03:00
Vinícius Garcia 335c30154d Fix linter complaints 2020-10-20 21:19:57 -03:00
Vinícius Garcia 5822e23de4 Add tests to QueryChunks function
This commit also fixes some bugs on this function and
adds a feature: Now you can return an kissorm.AbortIteration
error to abort the iteration and stop processing chunks.

This does not causes the call to QueryChunks to return an error,
since this is an expected error, thus, it is just ignored.
2020-10-14 15:45:16 -03:00
Vinícius Garcia 654997b09b Improve coverate on Query & QueryOne funcs 2020-10-14 13:53:09 -03:00
Vinícius Garcia e8bd504703 Split the Find function into the Query & QueryOne functions 2020-10-13 21:39:39 -03:00
Vinícius Garcia a3bf34146d Replace Query&QueryNext for the new QueryChunks func 2020-10-09 15:26:00 -03:00
Vinícius Garcia 76e5ad0f0f Improve comment on FillSliceWith() helper func 2020-09-30 22:12:00 -03:00
Vinícius Garcia ad77d0a1a0 Add FillSliceWith helper function 2020-09-30 22:11:41 -03:00
Vinícius Garcia 9844cb3e9a Add test for finding multiple users at once 2020-09-30 19:47:32 -03:00
Vinícius Garcia 54fa1f023a Remove GetByID function because it was redundant 2020-09-30 19:41:54 -03:00
Vinícius Garcia 1a08c61198 Fix english on comment 2020-09-29 15:59:04 -03:00
Breno Almeida 614cfde4b7 improve iterator.Close to prevent accidental panics 2020-09-28 18:26:17 -03:00
Breno Almeida fabffed6d1 apply linter suggestions & make structToMap public 2020-09-28 16:50:27 -03:00
Breno Almeida cb27801a20 finish implementing query & queryNext funcs 2020-09-24 19:26:59 -03:00
Vinícius Garcia 6c725a69f5 Add Query & QueryNext funcs 2020-09-24 14:17:19 -03:00
Vinícius Garcia 3f888e0420 Add tests to Update() 2020-09-22 22:15:03 -03:00
Vinícius Garcia d77fd7d679 Add func UpdateStructWith() for facilitating mocking this ORM 2020-09-22 21:07:03 -03:00
Vinícius Garcia 7b30856248 Rename go mod project 2020-09-22 16:59:04 -03:00
Vinícius Garcia 80fad8ac3f Add ChangeTable function 2020-09-16 18:26:00 -03:00
Vinícius Garcia a5ee2458ec Fix lint problems 2020-09-14 15:55:54 -03:00
Vinícius Garcia 120006008d Rename .go files to be more generic 2020-09-14 15:46:50 -03:00
Vinícius Garcia a3af26e3bd Update NewClient to actually work 2020-09-14 15:45:35 -03:00
Vinícius Garcia 06a7e37d0e Update Delete function to receive ids 2020-09-14 15:13:54 -03:00
Vinícius Garcia 8e8a9a7309 Add tests to StructToMap() 2020-09-14 12:02:05 -03:00
Vinícius Garcia bb3b36c21e Add first implementation of the Update operation 2020-09-12 03:07:35 -03:00
Vinícius Garcia e7a7b13eef Add slices/ helper pkg 2020-09-11 19:48:32 -03:00
Vinícius Garcia fbb7d9ffca Add GetByID() 2020-09-11 19:48:13 -03:00
Vinícius Garcia 25e00fdad6 Add feature of escaping params to Find function
This change was made based on a suggestion from
Raí Tamarindo (raitamarindo@gmail.com)
2020-09-11 19:06:53 -03:00
Vinícius Garcia 387c2cdd74 Rename the Get function to Find
This change was made based on a suggestion from
Raí Tamarindo (raitamarindo@gmail.com)
2020-09-11 19:03:15 -03:00
Vinícius Garcia 67cedb1f81 Add delete operation 2020-09-11 18:59:55 -03:00
Vinícius Garcia 4e156b8f26 Add Makefile 2020-09-11 18:48:48 -03:00
Vinícius Garcia 38ce8a9b0e Remove unnecessary use of reflection 2020-09-11 18:48:29 -03:00
Vinícius Garcia 2f651581ea Initial version
This code was first developed on another repo before we decided
to move it a separated repository.
2020-09-11 18:37:41 -03:00