func FindMessagesLink(ctx context.Context, exec boil.ContextExecutor, messageLinkID int64, selectCols ...string) (*MessagesLink, error) {
	messagesLinkObj := &MessagesLink{}

	sel := "*"
	if len(selectCols) > 0 {
		sel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), ",")
	}
	query := fmt.Sprintf(
		"select %s from \"messages_links\" where \"message_link_id\"=$1", sel,
	)

	q := queries.Raw(query, messageLinkID)

	err := q.Bind(ctx, exec, messagesLinkObj)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "models: unable to select from messages_links")
	}

	return messagesLinkObj, nil
}
// FindMessagesLink retrieves a single record by ID with an executor.
// If selectCols is empty Find will return all columns.
FindMessagesLink retrieves a single record by ID with an executor.
If selectCols is empty Find will return all columns.
// FindMessagesLink retrieves a single record by ID with an executor . // If selectCols is empty Find will return all columns .
func FindMessagesLink(ctx context.Context, exec boil.ContextExecutor, messageLinkID int64, selectCols ...string) (*MessagesLink, error) {
	messagesLinkObj := &MessagesLink{}
	sel := "*"
	if len(selectCols) > 0 {
		sel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), ",")
	}
	query := fmt.Sprintf(
		"select %s from \"messages_links\" where \"message_link_id\"=$1", sel,
	)
	q := queries.Raw(query, messageLinkID)
	err := q.Bind(ctx, exec, messagesLinkObj)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "models: unable to select from messages_links")
	}
	return messagesLinkObj, nil
}
func FindMessagesLink ( ctx context . Context , exec boil . ContextExecutor , messageLinkID int64 , selectCols ... string ) ( * MessagesLink , error ) { messagesLinkObj := & MessagesLink { } sel := " " if len ( selectCols ) > 0 { sel = strings . Join ( strmangle . IdentQuoteSlice ( dialect . LQ , dialect . RQ , selectCols ) , " " ) } query := fmt . Sprintf ( " \" \" \" \" " , sel , ) q := queries . Raw ( query , messageLinkID ) err := q . Bind ( ctx , exec , messagesLinkObj ) if err != nil { if errors . Cause ( err ) == sql . ErrNoRows { return nil , sql . ErrNoRows } return nil , errors . Wrap ( err , " " ) } return messagesLinkObj , nil }
FindMessagesLink retrieves a single record by ID with an executor.
FindMessagesLink retrieves a single record by ID with an executor .