Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with varchar primary key #38

Open
kirinse opened this issue Jul 12, 2020 · 0 comments
Open

Not working with varchar primary key #38

kirinse opened this issue Jul 12, 2020 · 0 comments

Comments

@kirinse
Copy link

kirinse commented Jul 12, 2020

	builder := rapidash.NewQueryBuilder("methods").
		Eq("code", code)
	tx.FindByQueryBuilder(builder, &method)

no rows found from db, but i am 100 percent sure there's record in database.

debug log:

{"level":"info","id":"bs5jqb3k3a68d31cfl8g","command":"get","type":"db","key":"SELECT `code`,`name`,`description`,`currency`,`type`,`amount_min`,`amount_max`,`created_at`,`updated_at`,`deleted_at` FROM `methods` WHERE `code` = ?","args":["\"CNYCC\""],"value":"[]","time":1594572076,"message":"<----get------[stash]-----[db]"}
{"level":"info","id":"bs5jqb3k3a68d31cfl8g","command":"set","type":"stash","key":"r/slc/methods/code#\"\\\"CNYCC\\\"\"","value":"nil","time":1594572076,"message":"----set------>[stash]     [server]"}
{"level":"info","id":"bs5jqb3k3a68d31cfl8g","command":"add","type":"server","key":"r/slc/methods/code#\"\\\"CNYCC\\\"\"/lock","value":"{ \"id\": bs5jqb3k3a68d31cfl8g, \"key\": r/slc/methods/code#\"\\\"CNYCC\\\"\", \"time\": 2020-07-13 00:41:16.140798 +0800 CST m=+6.040811516 }","time":1594572076,"message":"----add-------[stash]---->[server]"}
{"level":"info","id":"bs5jqb3k3a68d31cfl8g","command":"set","type":"server","key":"r/slc/methods/code#\"\\\"CNYCC\\\"\"","value":"nil","time":1594572076,"message":"----set-------[stash]---->[server]"}
{"level":"info","id":"bs5jqb3k3a68d31cfl8g","command":"delete","type":"server","key":"r/slc/methods/code#\"\\\"CNYCC\\\"\"/lock","time":1594572076,"message":"---delete-----[stash]---->[server]"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant