Emery Tanghanwaye
04/28/2020, 1:32 AMcompanion object : IntEntityClass<StarWarsFilm>(StarWarsFilms)
What exactly is this line?christophsturm
04/28/2020, 1:39 PMjava.lang.AssertionError: Failed on sqlite expected:<2020-04-28T13:36:40.867901> but was:<2020-04-28T13:36:40.867>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:834)
at org.junit.Assert.assertEquals(Assert.java:118)
at kotlin.test.junit.JUnitAsserter.assertEquals(JUnitSupport.kt:32)
at kotlin.test.AssertionsKt__AssertionsKt.assertEquals(Assertions.kt:51)
at kotlin.test.AssertionsKt.assertEquals(Unknown Source)
at org.jetbrains.exposed.JavaTimeTestsKt.assertEqualDateTime(JavaTimeTests.kt:57)
Alexander Afanasyev
04/28/2020, 2:41 PMchristophsturm
04/29/2020, 7:56 AMchristophsturm
04/29/2020, 10:28 AMspand
04/30/2020, 1:26 PMVARCHAR
column in MySQL with charset LATIN1
. Can I specify this in the table object so it will create the correct CREATE TABLE
statement ?Yoavya
05/05/2020, 9:28 AMreferencedOn
and referrersOn
functionscodec
05/09/2020, 1:17 AMMrPowerGamerBR
05/09/2020, 5:50 PMsuspendedTransactionAsync
and a normal blocking transaction
in the same coroutine, Exposed (well, in this case, HikariCP) throws a Connection is closed
exception. Is this intentional? If I change the suspendedTransactionAsync
to a normal transaction
again, the issue goes away. If I change every transaction
to a suspendedTransactionAsync
, the issue also goes away. I found that bug when I found out that Exposed does support coroutines so I decided to start replacing some of my old blocking transactions with coroutine-aware methodsasad.awadia
05/11/2020, 10:47 PMcodec
05/12/2020, 7:29 AMTmpod
05/12/2020, 7:27 PMRodrigo Silva
05/16/2020, 2:15 PMSlackbot
05/16/2020, 6:57 PMBornyls Deen
05/20/2020, 9:43 AMselect distinct on
(cats.name) cats
from
groups_cats
inner join
cats
on
groups_cats.cat_id = cats.id
where
groups_cats.cat_id = 25
order by
cats.name, groups.created desc
I've managed to come up with this
GroupsCats
.join(Cats, JoinType.INNER) { Cats.id eq GroupsCats.catId }
.select { GroupsCats.catId eq catId }
.orderBy(Cats.created to SortOrder.DESC)
But I can't figure out how to make the result distinct on a particular column (cat name in this case)... the withDistinct()
method sounded hopeful but doesn't seem to work in the way that I need.
If anyone has any ideas/suggestions I would really appreciate it.John Towell
05/20/2020, 8:21 PMneetkee
05/26/2020, 7:22 AMHikariPool-1 - Connection is not available, request timed out after 30005ms
Quick debugging showed, that Exposed is trying to acquire some metadata about database before transaction started. This is as far as I can get before error: org/jetbrains/exposed/sql/Database.kt:22. Is it an expected behaviour and exposed requires minimum amount of connections when used with spring, or is it something that can be fixed?pafmaf
05/26/2020, 10:44 AMcom.impossibl.postgres.jdbc.PGDriver
, since 24.1
it doesn't seem to be recognized as a postgre dialect 🤔 . Anyone got a hint before I go debugging?
EDIT: nvm, found it, has it's own dialect name ("pgsql") nowIaroslav Postovalov
05/26/2020, 2:43 PMkushalp
06/02/2020, 2:49 PM0.17.3
and I'm trying to upgrade to 0.25.1
. A recent change has meant that I am seeing the following error when using Database.connect
with `org.apache.tomcat.jdbc.pool.DataSource`:
Overload resolution ambiguity. All these functions match.
public final fun connect(datasource: ConnectionPoolDataSource, setupConnection: (Connection) → Unit = ..., manager: (Database) → TransactionManager = ...): Database defined in org.jetbrains.exposed.sql.Database.Companion
public final fun connect(datasource: DataSource, setupConnection: (Connection) → Unit = ..., manager: (Database) → TransactionManager = ...): Database defined in org.jetbrains.exposed.sql.Database.Companion
David Glasser
06/03/2020, 6:31 PM.slice
. is that possible (if i do want to be able to be lazy and use the default ‘all columns’ slice in many places)?Viet Hoang
06/04/2020, 7:35 AMlimit
and offset
is applied in 1 query, you have to use a window function:
SELECT foo
, count(*) OVER() AS full_count
FROM bar
WHERE <some condition>
ORDER BY <some col>
LIMIT <pagesize>
OFFSET <offset>;
or in case of MySQL, the FOUND_ROWS feature:
SELECT SQL_CALC_FOUND_ROWS * FROM tbl_name WHERE id > 100 LIMIT 10;
SELECT FOUND_ROWS();
Is there a way to achieve the same thing with Exposed ?Philip Walford
06/05/2020, 2:42 AMMERGE INTO
syntax. The wiki says I should look for builds of my PR in teamcity, but it isn’t showing up. Is there anything else I need to do?
Here’s the PR: https://github.com/JetBrains/Exposed/pull/942David Glasser
06/08/2020, 5:03 PMExpression<Boolean>.and
and friends) w.r.t. operator precedence. Do I just need to always parenthesize every sub-expression? I guess Kotlin doesn’t really do precedence levels of custom infix operators?Philip Walford
06/09/2020, 7:28 AMreplace
for h2sql. It passes the standard build, but I’m not really sure where to proceed from here. The Contribution guide says to
Submit Pull Request on review.but I’m not sure what that actually means. What are the next steps after creating a PR?
breandan
06/12/2020, 7:35 PMAlan Tran
06/12/2020, 9:12 PMRodrigo Silva
06/18/2020, 4:07 PMDougy
06/28/2020, 4:58 AMDEBUG Exposed - INSERT INTO ...
Would anyone know how to suppress these messages?Don Mitchell
06/29/2020, 2:03 PMorg.jetbrains.exposed.JavaTimeBaseTest > javaTimeFunctions STANDARD_OUT
20:41:39,049 WARN Test worker Exposed:invoke:183 - Transaction attempt #0 failed: java.sql.SQLFeatureNotSupportedException. Statement(s): INSERT INTO CITIESTIME (LOCAL_TIME, "NAME") VALUES (?, ?)
org.jetbrains.exposed.exceptions.ExposedSQLException: java.sql.SQLFeatureNotSupportedException
SQL: [INSERT INTO CITIESTIME (LOCAL_TIME, "NAME") VALUES (?, ?)]
at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:50)
...
org.jetbrains.exposed.JavaTimeBaseTest > javaTimeFunctions FAILED
org.jetbrains.exposed.exceptions.ExposedSQLException: java.sql.SQLFeatureNotSupportedException
SQL: [Failed on expanding args for INSERT: org.jetbrains.exposed.sql.statements.InsertStatement@3f32f77b]
at org.jetbrains.exposed.sql.statements.Statement.executeIn$exposed_core(Statement.kt:50)
...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.snowflake.client.jdbc.internal.io.netty.util.internal.ReflectionUtil (file:/Users/dmitchell/.gradle/caches/modules-2/files-2.1/net.snowflake/snowflake-jdbc/3.12.7/e47fa73b85037285b887c63602f9c509df27b2be/snowflake-jdbc-3.12.7.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of net.snowflake.client.jdbc.internal.io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release